Skip to content

Instantly share code, notes, and snippets.

@JusticeRage
Created October 25, 2019 12:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JusticeRage/de692126a493cdb22900459878d8d53a to your computer and use it in GitHub Desktop.
Save JusticeRage/de692126a493cdb22900459878d8d53a to your computer and use it in GitHub Desktop.
Quick IDAPython script to convert the selection to a CLSID.
from idaapi import *
from ida_kernwin import *
def to_guid(address):
format = "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}\n"
msg(format % (get_wide_dword(address),
get_wide_word(address + 4),
get_wide_word(address + 6),
get_wide_byte(address + 8),
get_wide_byte(address + 9),
get_wide_byte(address + 10),
get_wide_byte(address + 11),
get_wide_byte(address + 12),
get_wide_byte(address + 13),
get_wide_byte(address + 14),
get_wide_byte(address + 15)))
to_guid(read_selection_start())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment