Created
January 4, 2021 10:46
-
-
Save irshadqemu/68a4db9b3f8f4f205e17f6050ffbb652 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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