Compact XORs
Last updated
Last updated
from textwrap import wrap
s = '610c6115651072014317463d73127613732c73036102653a6217742b701c61086e1a651d742b69075f2f6c0d69075f2c690e681c5f673604650364023944'
bytes_ = wrap(s, 4) # Group into "{char1}{char2}"
flag = ""
for byte in bytes_:
x, y = map(lambda i: int(i,16) , wrap(byte, 2)) # Hex to int
flag += chr(x) # Add plaintext
flag += chr(y ^ x) # Add decoded
print(flag)