Skip to content

Instantly share code, notes, and snippets.

@suidroot
Created April 18, 2022 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suidroot/61c74046d8ae8b206174d6a19e16b4b9 to your computer and use it in GitHub Desktop.
Save suidroot/61c74046d8ae8b206174d6a19e16b4b9 to your computer and use it in GitHub Desktop.
IDA function REnamer by Address
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