Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import binascii
from itertools import cycle
SERVER_RESPONSE_FIE = "server_response.txt"
XOR_KEY = b"ZKkz8PH0"
with open(SERVER_RESPONSE_FIE) as serverfd:
resp_str = serverfd.read()
resp_str = resp_str[::-1]
resp_bytes = binascii.unhexlify(resp_str)
decoded_bytes = [x ^ y for (x, y) in zip(resp_bytes, cycle(XOR_KEY))]
with open("decoded.dll_", "wb") as outfile:
outfile.write(bytes(decoded_bytes))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment