This commit is contained in:
Maxime Vorwerk
2024-06-21 16:40:52 +02:00
parent bab4006b61
commit 560144c8cc
5 changed files with 44 additions and 0 deletions

13
easy_1/sol.py Executable file
View File

@@ -0,0 +1,13 @@
#!/home/maxime/.pyvenv/bin/python3
with open("table.txt", 'r') as f, open("key", 'r') as g, open("enc_flag", 'r') as h:
lines = f.readlines()
key = g.read().strip()
enc_flag = h.read().strip()
flag = "picoCTF{"
assert len(enc_flag) == len(key)
for p, q in zip(enc_flag, key):
flag += chr((ord(p) - ord(q)) % 26 + ord('A'))
flag += '}'
print(flag)