Python idaapi 模块,UI_Hooks() 实例源码

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

项目:polichombr    作者:ANSSI-FR    | 项目源码 | 文件源码
def __init__(self, skel_conn):
            idaapi.UI_Hooks.__init__(self)
            self.skel_conn = skel_conn
项目:continuum    作者:zyantific    | 项目源码 | 文件源码
def init(self):
        """init callback, invoked by IDA when the plugin is loaded."""
        self.core = Continuum()
        zelf = self

        # Place UI hook so we know when to create our UI stuff.
        class UiHooks(idaapi.UI_Hooks):
            def ready_to_run(self, *_):
                zelf.ui_init()
                zelf.ui_hook.unhook()

        self.ui_hook = UiHooks()
        self.ui_hook.hook()

        # Setup IDP hook for type changes.
        class IdbHooks(idaapi.IDB_Hooks):
            def local_types_changed(self, *args):
                if zelf.core.client and not zelf.core.project.ignore_changes:
                    zelf.core.project.index.index_types_for_this_idb(purge_locally_deleted=True)
                    zelf.core.client.send_sync_types(purge_non_indexed=True)
                return 0

        self.idb_hook = IdbHooks()
        self.idb_hook.hook()

        # Hack ref to plugin core object into idaapi for easy debugging.
        idaapi.continuum = self.core

        print("[continuum] v0.0.0 by athre0z (zyantific.com) loaded!")
        return idaapi.PLUGIN_KEEP
项目:idascripts    作者:ctfhacker    | 项目源码 | 文件源码
def __start_ida__(cls):
        api = [
            ('idp', idaapi.IDP_Hooks),
            ('idb', idaapi.IDB_Hooks),
            ('ui', idaapi.UI_Hooks),
        ]
        priorityhook = internal.interface.priorityhook
        for attr, hookcls in api:
            if not hasattr(cls, attr):
                setattr(cls, attr, priorityhook(hookcls))
            continue
        return