updates people updates
This commit is contained in:
25
training/htb/challenges/rev/solve.py
Normal file
25
training/htb/challenges/rev/solve.py
Normal file
@@ -0,0 +1,25 @@
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user