Python idaapi 模块,PLUGIN_KEEP 实例源码

我们从Python开源项目中,提取了以下2个代码示例,用于说明如何使用idaapi.PLUGIN_KEEP

项目:idawilli    作者:williballenthin    | 项目源码 | 文件源码
def init(self):
        self.hooks = CallsHintsHook()
        if self.hooks.hook():
            return idaapi.PLUGIN_KEEP
        else:
            logger.warning('error setting hooks.')
            return idaapi.PLUGIN_SKIP
项目:iddaa    作者:0xddaa    | 项目源码 | 文件源码
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