Skip to content

Instantly share code, notes, and snippets.

@Grazfather
Created September 16, 2017 05:28
Show Gist options
  • Save Grazfather/bde42edeb49ac2fb623699bb09c1d416 to your computer and use it in GitHub Desktop.
Save Grazfather/bde42edeb49ac2fb623699bb09c1d416 to your computer and use it in GitHub Desktop.
# Run from within gdb (e.g. `pi <enter>` and paste)
need = [0x27, 0xb3, 0x73, 0x9d, 0xf5, 0x11, 0xe7, 0xb1, 0xb3, 0xbe, 0x99, 0xb3, 0xf9, 0xf9, 0xf4, 0x30, 0x1b, 0x71, 0x99, 0x73, 0x23, 0x65, 0x99, 0xb1, 0x65, 0x11, 0x11, 0xbe, 0x23, 0x99, 0x27, 0xf9, 0x23, 0x99, 0x05, 0x65, 0xce]
map = {}
for i in range(0xfe):
r = gdb.execute("call get_tbl_entry({})".format(i), False, True)
v = int(r.rstrip().split()[-1], 16)
map[v] = i
s = ""
for v in need:
s += chr(map[v])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment