Files
ctf/training/htb/challenges/rev/solve.py
2026-06-12 00:36:55 +02:00

26 lines
367 B
Python

from pwn import xor
with open("./encrypted_data.txt", "r") as f:
data = f.readline()
key = bytes.fromhex("524A4A3344534350")
print(len(key))
dec_key = []
for s in key:
s -= 17
if s < ord('A'):
s += 26
dec_key.append(s)
dec_key[3] = b"3"[0]
print("".join(chr(c) for c in dec_key))
data = bytes.fromhex(data)
print(xor(data, dec_key))