IDApython 重命名函数

import idaapi
import ida_name
import idc



startAddr = idc.get_screen_ea()
tmpaddr = startAddr
while True:
    
    funcAddr = idaapi.get_dword(tmpaddr)
    isfunc = idc.get_func_flags(funcAddr)
    if isfunc == -1:
        print("Addr %d not is function",funcAddr)
        break
    bsuccess = ida_name.set_name(funcAddr,"STNAdapter_"+"sub_" + hex(funcAddr).replace("0x",""))
    if bsuccess == True:
        tmpaddr = tmpaddr + 4
    else:
        break;      

你可能感兴趣的:(IDApython,逆向)