def activate(self, ctx):
ea = ScreenEA()
str_id = idaapi.get_highlighted_identifier()
if str_id[-1] == 'h':
addr = int(str_id[:-1], 16)
elif str_id[-1] == 'o':
addr = int(str_id[:-1], 8)
elif str_id[-1] == 'b':
addr = int(str_id[:-1], 2)
else:
addr = int(str_id)
temp = self.find_nearest_function(addr)
if temp != None:
n = GetFunctionName(ea)
n_addr = int(n[4:],16)
idaapi.msg(temp)
idc.MakeName(n_addr, temp)
评论列表
文章目录