Created
March 7, 2021 21:59
-
-
Save withmorten/8cb00821fd05374d53a2cbd28eee2841 to your computer and use it in GitHub Desktop.
check_xrefs.py
This file contains 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
import idautils | |
import idc | |
import idaapi | |
def demangle(name): | |
mask = idc.get_inf_attr(idc.INF_LONG_DN) | |
demangled = idc.demangle_name(name, mask) | |
if demangled is None: | |
return name | |
return demangled | |
def check_xrefs(func_start, func_name): | |
for r in idautils.XrefsTo(func_start, 0): | |
if r.type == fl_CF or r.type == fl_CN or r.type == fl_JF or r.type == fl_JN or r.type == dr_O: | |
return | |
print hex(int(func_start)), func_name | |
for segea in Segments(): | |
for funcea in Functions(segea, get_segm_end(segea)): | |
check_xrefs(funcea, demangle(get_func_name(funcea))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment