Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/python
# x/32bx *((unsigned long *)($rbp-0x68))
# a = [0x75, 0x63, 0x6b, 0x69, 0x7b, 0x7a, 0x7d, 0x64, 0x72, 0x79, 0x73, 0x6d, 0x67, 0x70, 0x68, 0x76, 0x6c, 0x6f, 0x66, 0x6e, 0x7c, 0x77, 0x65, 0x74, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00]
# a = [0x75, 0x63, 0x6b, 0x69, 0x7b, 0x7a, 0x7d, 0x64, 0x72, 0x79, 0x73, 0x6d, 0x67, 0x70, 0x68, 0x76, 0x6c, 0x6f, 0x66, 0x6e, 0x7c, 0x77, 0x65, 0x74, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00]
a = [0x75, 0x63, 0x6b, 0x69, 0x7b, 0x7a, 0x7d, 0x64, 0x72, 0x79, 0x73, 0x6d, 0x67, 0x70, 0x68, 0x76, 0x6c, 0x6f, 0x66, 0x6e, 0x7c, 0x77, 0x65, 0x74, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00]
b = "abcdefghijklmnopqrstuvwxyz|{}"
# ORIG: | { } _ `
# KEYS: 0x71 0x6a 0x61 0x5f
f = [0x7a, 0x6d, 0x75, 0x7d, 0x6a, 0x6e, 0x64, 0x7b, 0x6f, 0x7b, 0x66, 0x5f, 0x6e, 0x64, 0x6f, 0x7b, 0x7b, 0x5f, 0x68, 0x7a, 0x5f, 0x7b, 0x67, 0x61, 0x20, 0xdf, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00]
# TOTAL CHARSET = |{`
out = ""
for fk in f:
try:
o = a.index(fk)
out += b[o]
except:
if fk == 0x6a:
out += "{"
elif fk == 0x5f:
out += "_"
elif fk == 0x61:
out += "}"
else:
print "UKNOWN FK %02x" % fk
out += "#"
print out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment