def init(self):
self.hooks = CallsHintsHook()
if self.hooks.hook():
return idaapi.PLUGIN_KEEP
else:
logger.warning('error setting hooks.')
return idaapi.PLUGIN_SKIP
python类PLUGIN_KEEP的实例源码
def init(self):
print('CGC Helper ({}) plugin has been loaded.'.format(utils.dump_version(version)))
hotkey_ctx = idaapi.add_hotkey('Shift-R', CGCHelper.revise_syscall)
if hotkey_ctx:
print(self.help)
return idaapi.PLUGIN_KEEP
else:
print('Failed to register CGCHelper hotkey!')
del hotkey_ctx
return idaapi.PLUGIN_SKIP