python类UI_Hooks()的实例源码

skelenox.py 文件源码 项目:polichombr 作者: ANSSI-FR 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def __init__(self, skel_conn):
            idaapi.UI_Hooks.__init__(self)
            self.skel_conn = skel_conn
plugin.py 文件源码 项目:continuum 作者: zyantific 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
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
ui.py 文件源码 项目:idascripts 作者: ctfhacker 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
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


问题


面经


文章

微信
公众号

扫码关注公众号