plugin.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目: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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号