Skip to content

Instantly share code, notes, and snippets.

@InersIn
Created August 1, 2021 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save InersIn/7d708d7e5ee145c0057c60f68e754bdb to your computer and use it in GitHub Desktop.
Save InersIn/7d708d7e5ee145c0057c60f68e754bdb to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
from pwn import xor
# bash echo -ne "133f29027034094a33253126395b3704" | xxd -r -p > hexflag.txt
hexflag=open("hexflag.txt", 'rb').read()
# Get The Key
key=""
flagformat="RTL{"
for x in range(4):
key+=chr(hexflag[x]^ord(flagformat[x]))
print(f"Found the key: {key}")
# Xor using Pwntools
print("Flag:",xor(key, hexflag).decode())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment