Last active
February 17, 2016 16:39
-
-
Save tmr232/78ca497a5de36b840f88 to your computer and use it in GitHub Desktop.
Rename functions based on referenced strings. Useful for debug prints.
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
import sark | |
import idautils | |
# Rename all functions with a `.*::.*` print in them. | |
for si in idautils.Strings(): | |
if '::' in str(si): | |
for xref in sark.Line(si.ea).xrefs_to: | |
sark.Function(xref.frm).set_name(str(si), anyway=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment