Skip to content

Instantly share code, notes, and snippets.

@pinksawtooth
Last active February 19, 2024 00:47
Show Gist options
  • Select an option

  • Save pinksawtooth/ee59ef5d900247f30881c8350bc6e310 to your computer and use it in GitHub Desktop.

Select an option

Save pinksawtooth/ee59ef5d900247f30881c8350bc6e310 to your computer and use it in GitHub Desktop.
decode_payload.py
import struct
key="APyfhCxJ"
decoded_payload=b""
with open("encoded_payload.bin", 'rb') as f:
encoded_payload = f.read()
for i in range(len(encoded_payload)):
decoded_payload+=struct.pack('B',(encoded_payload[i] ^ ord(key[i%len(key)])))
with open("decoded_payload.bin", 'wb') as f:
f.write(decoded_payload)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment