Created
June 6, 2013 08:14
-
-
Save wirepair/5720064 to your computer and use it in GitHub Desktop.
IDAPython script to get Data Ref's for a variable and print out function, address ref'd and whether read/write,
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 characters
from idautils import * | |
from idc import * | |
from idaapi import * | |
ea = ScreenEA() | |
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 "%s(0x%x) | %s"%(GetFunctionName(xref.frm), xref.frm, ref_type) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment