Created
June 13, 2019 14:43
-
-
Save lucasg/2fe0e9a15c31925a8fd15bd681f6df1a to your computer and use it in GitHub Desktop.
Revisions
-
lucasg created this gist
Jun 13, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ import ida_bytes import binascii def get_guid(address): data1 = ida_bytes.get_dword(address) data2 = ida_bytes.get_word(address + 4) data3 = ida_bytes.get_word(address + 6) data4 = ida_bytes.get_bytes(address + 8, 8) return "%08x-%04x-%04x-%s" % (data1, data2, data3, binascii.hexlify(data4)) def get_alt_guid(address): data1 = ida_bytes.get_dword(address) data2 = ida_bytes.get_word(address + 4) data3 = ida_bytes.get_word(address + 6) data4 = ida_bytes.get_word(address + 8) data5 = ida_bytes.get_bytes(address + 10, 6) return "{%08x-%04x-%04x-%04x-%s}" % (data1, data2, data3, data4, binascii.hexlify(data5))