当前位置: 首页>>代码示例>>Python>>正文


Python idaapi.plugin_t方法代码示例

本文整理汇总了Python中idaapi.plugin_t方法的典型用法代码示例。如果您正苦于以下问题:Python idaapi.plugin_t方法的具体用法?Python idaapi.plugin_t怎么用?Python idaapi.plugin_t使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在idaapi的用法示例。


在下文中一共展示了idaapi.plugin_t方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import plugin_t [as 别名]
def __init__(self, path, **attrs):
        # FIXME: go through all files in plugin/ and call PLUGIN_ENTRY() on each module
        #        this should return an idaapi.plugin_t.

        # idaapi.plugin_t will contain an init, run, and term method.
        # also, are some attributes to process:
        # 'wanted_name' which is for idc.
        # 'wanted_hotkey', which should be mapped to a keypress.
        # 'comment' self-explanatory
        # 'help' self-explanatory

        # hotkey can be done by:
        # idaapi.CompileLine('static myname() { RunPythonStateMent("CallSomePython()") }')
        # idc.AddHotKey(module.wanted_hotkey, "myname")

        # idaapi.require
        pass

## ida's native api 
开发者ID:arizvisa,项目名称:ida-minsc,代码行数:21,代码来源:idapythonrc.py

示例2: __init__

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import plugin_t [as 别名]
def __init__(self, *args, **kwargs):
        print("[IDASkins] {} by athre0z (zyantific.com) loaded!".format(
            VERSION
        ))

        QObject.__init__(self, *args, **kwargs)
        idaapi.plugin_t.__init__(self)

        # First start dialog.
        self._settings = Settings()
        if self._settings.first_start:
            selection = QMessageBox.information(
                qApp.activeWindow(),
                "IDASkins: First start",
                "IDASkins has detected that this is the first time you've started IDA with "
                "the plugin installed. Select a theme now?",
                QMessageBox.Yes | QMessageBox.No,
            )

            if selection == QMessageBox.Yes:
                self.open_theme_selector()

            self._settings.first_start = False
        else:
            # v2.0.0 used absolute pathes due to a bug.
            # Fix settings from this particular version here.
            theme_dir = self._settings.selected_theme_dir
            if theme_dir and os.path.isabs(theme_dir):
                print('[IDASkins] Updating buggy v2.0.0 theme path')
                self._settings.selected_theme_dir = os.path.split(theme_dir)[-1]

        self._theme_selector = None
        self.apply_stylesheet_from_settings()

        # Subscribe UI notifications.
        self._ui_hooks = UiHooks()
        self._ui_hooks.hook() 
开发者ID:zyantific,项目名称:IDASkins,代码行数:39,代码来源:plugin.py

示例3: add_menus

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import plugin_t [as 别名]
def add_menus(self):
        # To avoid creating multiple plugin_t instances
        this = self
        class StartHandler(idaapi.action_handler_t):
            def __init__(self):
                idaapi.action_handler_t.__init__(self)
                
            def activate(self, ctx):
                this.run()
                return 1

            def update(self, ctx):
                return idaapi.AST_ENABLE_ALWAYS

        act_name = '%s:start' % PLUGNAME
        act_desc = idaapi.action_desc_t(
            act_name,       # The action name. Must be unique
            PLUGNAME,       # Action Text
            StartHandler(), # Action handler
            None,           # Optional shortcut
            'Start plugin', # Action tooltip
            122             # Icon
        )
        idaapi.register_action(act_desc)
        idaapi.attach_action_to_menu(
            'Debugger/Debugger windows/',
            act_name,
            idaapi.SETMENU_APP
        ) 
开发者ID:danigargu,项目名称:heap-viewer,代码行数:31,代码来源:heap_viewer.py


注:本文中的idaapi.plugin_t方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。