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


Python idaapi.add_menu_item方法代码示例

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


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

示例1: insert

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import add_menu_item [as 别名]
def insert(self, option_groups=[]):
        if "enable" in option_groups:
            self.enable_menu_item = idaapi.add_menu_item("FILE/", "Enable IDASynergy for this IDB", "", 0, self.on_enable_plugin, ())
            #self.remove_hooks()
        else:
            if "svn" in option_groups and self.svn_menuitems == []:
                self.svn_menuitems.append( idaapi.add_menu_item("FILE/", "IDASynergy SVN Checkout...", "", 0, self.on_checkout, ()) )
                self.svn_menuitems.append( idaapi.add_menu_item("FILE/", "IDASynergy SVN Commit...", "CTRL+SHIFT+C", 0, self.on_commit, () ))
                self.svn_menuitems.append( idaapi.add_menu_item("FILE/", "IDASynergy SVN Update...", "CTRL+SHIFT+U", 0, self.on_update, () ))
            if "full" in option_groups and self.ex_addmenu_item_ctx == []:
                self.ex_addmenu_item_ctx.append( idaapi.add_menu_item("Options/", "IDASynergy...", "", 0, self.on_config, ()) )
                self.ex_addmenu_item_ctx.append( idaapi.add_menu_item("FILE/", "IDASynergy Load from local repository", "", 0, self.on_import_all, ()) )
                self.ex_addmenu_item_ctx.append( idaapi.add_menu_item("FILE/", "IDASynergy Export analysis to file", "", 0, self.on_export, ()) )
                self.ex_addmenu_item_ctx.append( idaapi.add_menu_item("FILE/", "IDASynergy Import analysis from file", "", 0, self.on_import, ()))
                #self.insert_hooks()
                self.remove(["enable"]) 
开发者ID:CubicaLabs,项目名称:IDASynergy,代码行数:18,代码来源:IDASynergy.py

示例2: installMenu

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import add_menu_item [as 别名]
def installMenu():
    #hack -> stashing a flag under idaapi to prevent multiple menu items from appearing
    if hasattr(sys.modules['idaapi'], '_apply_callee_type_plugin_installFlag'):
        #print('Skipping menu install: already present')
        return
    if using_ida7api:
        return installMenuIda7()
    global ex_addmenu_item_ctx
    ex_addmenu_item_ctx = idaapi.add_menu_item(
        MENU_PATH, 
        PLUGIN_NAME, 
        PREFERRED_SHORTCUT, 
        0, 
        doApplyCallee, 
        tuple("hello world")
    )
    if ex_addmenu_item_ctx  is None:
        print('Failed to init apply_callee_type_plugin')

    setattr(sys.modules['idaapi'], '_apply_callee_type_plugin_installFlag', True) 
开发者ID:fireeye,项目名称:flare-ida,代码行数:22,代码来源:apply_callee_type_plugin.py

示例3: register_menu

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import add_menu_item [as 别名]
def register_menu(self):
    global g_bindiff
    g_bindiff = self

    idaapi.add_menu_item("Edit/Plugins/", "Diaphora - Show results", "F3", 0, show_choosers, ())
    idaapi.add_menu_item("Edit/Plugins/", "Diaphora - Save results", None, 0, save_results, ())
    idaapi.add_menu_item("Edit/Plugins/", "Diaphora - Load results", None, 0, load_results, ())
    Warning("""AUTOHIDE REGISTRY\nIf you close one tab you can always re-open it by pressing F3
or selecting Edit -> Plugins -> Diaphora - Show results""") 
开发者ID:joxeankoret,项目名称:maltindex,代码行数:11,代码来源:diaphora_ida.py

示例4: init

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import add_menu_item [as 别名]
def init(self):
        NO_HOTKEY = ""
        SETMENU_INS = 0
        NO_ARGS = tuple()

        logger.debug("[+] %s.init()" % self.__class__.__name__)
        self.menuitems = []

        logger.debug("[+] setting up menus for ida version %s" % idaapi.IDA_SDK_VERSION)

        if idaapi.IDA_SDK_VERSION >= 700:
            # >= 700
            action_desc = idaapi.action_desc_t("tintinweb:batchdecompile:load", self.wanted_name, IdaDecompileUiActionHandler(self))
            idaapi.register_action(action_desc)
            idaapi.attach_action_to_menu(''.join(self.wanted_menu), "tintinweb:batchdecompile:load", idaapi.SETMENU_APP)

        else:
            menu = idaapi.add_menu_item(self.wanted_menu[0],
                                        self.wanted_menu[1],
                                        NO_HOTKEY,
                                        SETMENU_INS,
                                        self.menu_config,
                                        NO_ARGS)

            self.menuitems.append(menu)

        return idaapi.PLUGIN_KEEP 
开发者ID:tintinweb,项目名称:ida-batch_decompile,代码行数:29,代码来源:ida_batch_decompile.py

示例5: AddMenuElements

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import add_menu_item [as 别名]
def AddMenuElements(self):
        idaapi.add_menu_item("File/", "Code editor", "Alt-E", 0, self.popeye, ())
        idaapi.set_menu_item_icon("File/Code editor", idaapi.load_custom_icon(":/ico/python.png")) 
开发者ID:techbliss,项目名称:Python_editor,代码行数:5,代码来源:Python_editor.py

示例6: add

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import add_menu_item [as 别名]
def add(cls, path, name, callable, hotkey='', flags=0, args=()):
        '''Register a `callable` as a menu item at the specified `path` with the provided `name`.'''

        # check to see if our menu item is in our cache and remove it if so
        if (path, name) in cls.state:
            cls.rm(path, name)

        # now we can add the menu item since everything is ok
        # XXX: I'm not sure if the path needs to be utf8 encoded or not
        res = internal.utils.string.to(name)
        ctx = idaapi.add_menu_item(path, res, hotkey, flags, callable, args)
        cls.state[path, name] = ctx 
开发者ID:arizvisa,项目名称:ida-minsc,代码行数:14,代码来源:ui.py

示例7: init

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import add_menu_item [as 别名]
def init(self):
        # register popup menu handlers
        try:
            # Register Auto Fix IDB handler
            VxHunterMCFixIDB.register(self, "Auto Fix IDB With symbol table")
            # Register Fix Code handler
            VxHunterMCFixCode.register(self, "Fix Code from start address to end address")
            # Register Fix Ascii handler
            VxHunterMCFixAscii.register(self, "Fix Ascii string table with giving address")
            # Register Load symbol file handler
            VxHunterMCLoadSymbolFile.register(self, "Load VxWorks symbol file")

        except Exception as err:
            print("Got Error!!!: %s" % err)

        # setup popup menu
        if idaapi.IDA_SDK_VERSION >= 700:
            # Add menu IDA >= 7.0
            idaapi.attach_action_to_menu("Edit/VxHunter/", VxHunterMCFixIDB.get_name(), idaapi.SETMENU_APP)
            idaapi.attach_action_to_menu("Edit/VxHunter/", VxHunterMCFixCode.get_name(), idaapi.SETMENU_APP)
            idaapi.attach_action_to_menu("Edit/VxHunter/", VxHunterMCFixAscii.get_name(), idaapi.SETMENU_APP)
            idaapi.attach_action_to_menu("Edit/VxHunter/", VxHunterMCLoadSymbolFile.get_name(), idaapi.SETMENU_APP)
        else:
            # add Vxhunter menu
            menu = idaapi.add_menu_item("Edit/VxHunter/", "Auto Fix IDB1", "", 1, self.handler_auto_fix_idb, None)
            if menu is not None:
                pass

        print("=" * 80)
        return idaapi.PLUGIN_KEEP 
开发者ID:PAGalaxyLab,项目名称:vxhunter,代码行数:32,代码来源:vxhunter_ida.py

示例8: init

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import add_menu_item [as 别名]
def init(self):
        """
        Initialize plugin:
        """
        self._client_config = load_config()
        self._fcc = None
        if self._client_config is not None:
            self._fcc = FCatalogClient(\
                    (self._client_config.remote_host,\
                    self._client_config.remote_port),\
                    self._client_config.db_name,\
                    self._client_config.exclude_pattern)

        # Make sure that self._client config is built, even if it doesn't have
        # any fields inside:
        if self._client_config is None:
            self._client_config = ClientConfig()

        # Set up menus:
        ui_path = "Edit/"
        self.menu_contexts = []
        self.menu_contexts.append(idaapi.add_menu_item(ui_path,
                                "FCatalog: Configure",
                                "",
                                0,
                                self._show_conf_form,
                                (None,)))

        self.menu_contexts.append(idaapi.add_menu_item(ui_path,
                                "FCatalog: Commit Functions",
                                "",
                                0,
                                self._commit_funcs,
                                (None,)))
        self.menu_contexts.append(idaapi.add_menu_item(ui_path,
                                "FCatalog: Find Similars",
                                "",
                                0,
                                self._find_similars,
                                (None,)))
        self.menu_contexts.append(idaapi.add_menu_item(ui_path,
                                "FCatalog: Clean IDB",
                                "",
                                0,
                                self._clean_idb,
                                (None,)))

        return idaapi.PLUGIN_KEEP 
开发者ID:xorpd,项目名称:fcatalog_client,代码行数:50,代码来源:fcatalog_plugin.py


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