Easy1
This commit is contained in:
13
easy_1/sol.py
Executable file
13
easy_1/sol.py
Executable 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)
|
||||
|
||||
Reference in New Issue
Block a user