Skip to content

Instantly share code, notes, and snippets.

@ret5et
Created September 8, 2015 14:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ret5et/a058919ce871c27c8984 to your computer and use it in GitHub Desktop.
Save ret5et/a058919ce871c27c8984 to your computer and use it in GitHub Desktop.
from idautils import *
from idc import *
from idaapi import *
ea = ScreenEA()
def xref_to_func(ea):
for xref in XrefsTo(ea, 0):
ref_type = ""
if xref.type == dr_W:
ref_type = "W"
elif xref.type == dr_R:
ref_type = "R"
else:
ref_type = "Unknown"
print "0x%x - %s" % (xref.frm, GetFunctionName(xref.frm))
#xref_to_func(here())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment