Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Simple decoding routine for Mirai encoded strings
import sys
def decode(input):
key = 0xdeadbeef
k1 = key & 0xFF
k2 = (key>>8) & 0xFF
k3 = (key>>16) & 0xFF
k4 = (key>>24) & 0xFF
output = ""
for n in input:
output += chr(ord(n)^k4^k3^k2^k1)
print output
decode(sys.argv[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment