Created
April 18, 2022 20:24
-
-
Save suidroot/61c74046d8ae8b206174d6a19e16b4b9 to your computer and use it in GitHub Desktop.
IDA function REnamer by Address
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 idaapi | |
import idautils | |
import idc | |
# Function_Name,Address | |
lines = '''function_name,12023345''' | |
def do_rename(l): | |
splitted = l.split(',') | |
straddr = splitted[1] | |
strname = splitted[0].replace("\r", "").replace("\n", "") | |
eaaddr = int(straddr, 16) | |
idc.MakeCode(eaaddr) | |
idc.MakeFunction(eaaddr) | |
idc.MakeNameEx(int(straddr, 16), strname, idc.SN_NOWARN) | |
if __name__ == "__main__": | |
line_list = lines.split('\n') | |
for line in line_list: | |
print(line) | |
do_rename(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment