我们从Python开源项目中,提取了以下2个代码示例,用于说明如何使用idaapi.PLUGIN_KEEP。
def init(self): self.hooks = CallsHintsHook() if self.hooks.hook(): return idaapi.PLUGIN_KEEP else: logger.warning('error setting hooks.') return idaapi.PLUGIN_SKIP
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