hugsy / ida-headless

IDA (sort of) headless
MIT License
19 stars 4 forks source link

AttributeError: cannot access 'GetFunctionName' #1

Open weituotian opened 7 months ago

weituotian commented 7 months ago
import rpyc

c = rpyc.connect("localhost", 18812)
idaapi = c.root.idaapi
idc = c.root.idc
idautils = c.root.idautils

addr = 0x14000f544
func = idaapi.get_func(addr)

if func is not None:
    function_name = idc.GetFunctionName(func.startEA)
    print("The instruction belongs to function: " + function_name)
else:
    print("The instruction does not belong to a function.")

many field can not access

ida pro 7.7

weituotian commented 7 months ago
if func is not None:
    print(func.start_ea)
else:
    print("The instruction does not belong to a function.")

AttributeError: cannot access 'start_ea'