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


Python idaapi.SETMENU_APP属性代码示例

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


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

示例1: _inject_ctx_actions

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [as 别名]
def _inject_ctx_actions(self, view, popup, view_type):
        """
        Inject context menu entries into IDA's right click menus.

        NOTE: This is only being used for coverage xref at this time, but
        may host additional actions in the future.

        """

        if view_type == idaapi.BWN_DISASMS:

            idaapi.attach_action_to_popup(
                view,
                popup,
                self.ACTION_COVERAGE_XREF,  # The action ID (see above)
                "Xrefs graph from...",      # Relative path of where to add the action
                idaapi.SETMENU_APP          # We want to append the action after ^
            ) 
开发者ID:gaasedelen,项目名称:lighthouse,代码行数:20,代码来源:ida_integration.py

示例2: register_munu_actions

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [as 别名]
def register_munu_actions():
    act_registers = '%s:registers' % PLUGIN_NAME
    act1 = idaapi.action_desc_t(
        act_registers,
        REGS_WIDGET_TITLE,
        StartHandler(REGS_WIDGET_TITLE),
        'Alt-Shift-D',
        'Start plugin',
        122
    )
    idaapi.register_action(act1)
    idaapi.attach_action_to_menu(DBG_MENU_PATH, act_registers, idaapi.SETMENU_APP)

    act_stack = '%s:stack' % PLUGIN_NAME
    act2 = idaapi.action_desc_t(act_stack,
        STACK_WIDGET_TITLE,
        StartHandler(STACK_WIDGET_TITLE),
        'Alt-Shift-E',
        'Start plugin',
        122
    )
    idaapi.register_action(act2)
    idaapi.attach_action_to_menu(DBG_MENU_PATH, act_stack, idaapi.SETMENU_APP) 
开发者ID:danigargu,项目名称:deREferencing,代码行数:25,代码来源:dereferencing.py

示例3: add_menus

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [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

示例4: add_menu_item_helper

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [as 别名]
def add_menu_item_helper(self, name, text, tooltip, handler, icon, shortcut):
        description = idaapi.action_desc_t(name, text, handler, shortcut, tooltip, icon)
        idaapi.register_action(description)
        idaapi.attach_action_to_menu("DIE/" + text, name, idaapi.SETMENU_APP)

        self._menus_names.append(name) 
开发者ID:ynvb,项目名称:DIE,代码行数:8,代码来源:DIE.py

示例5: init

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [as 别名]
def init(self):
        self._lca_viewer = None

        self._lca_starter = lca_viewer_starter(self)
        self._lca_starter.register()
        idaapi.attach_action_to_menu("View/Graph Overview", self._lca_starter.get_name(), idaapi.SETMENU_APP)

        self._idaview_handler = idaview_add_target_handler(self)
        self._idaview_handler.register()
        self._hooks = idaview_hooks(self._idaview_handler)()
        self._hooks.hook()

        return idaapi.PLUGIN_KEEP 
开发者ID:tmr232,项目名称:Sark,代码行数:15,代码来源:lca.py

示例6: init

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [as 别名]
def init(self):
        self.lines = set()
        self.settings = IDASettings('HighlightCalls')
        try:
            self.set_color(self.settings['color'])
        except KeyError:
            self.settings.user['color'] = HIGHLIGHT_COLOR
            self.set_color(HIGHLIGHT_COLOR)
        self.ui_hooks = UiHooks(self.lines)

        self.toggle_action_desc = idaapi.action_desc_t('HighlightCalls:Toggle',
                                                       'Toggle call highlighting',
                                                       ToggleHighlightHandler(self.enable_highlights,
                                                                              self.disable_highlights),
                                                       '',
                                                       'Toggle call highlighting',
                                                       -1)
        idaapi.register_action(self.toggle_action_desc)

        self.color_selector = idaapi.action_desc_t('HighlightCalls:SelectColor',
                                                   'Select highlight color',
                                                   SelectColorHandler(set_color=self.set_color),
                                                   '',
                                                   'Select highlight color',
                                                   -1)
        idaapi.register_action(self.color_selector)

        idaapi.attach_action_to_menu('View/', self.toggle_action_desc.name, idaapi.SETMENU_APP)
        idaapi.attach_action_to_menu('View/', self.color_selector.name, idaapi.SETMENU_APP)

        return idaapi.PLUGIN_KEEP 
开发者ID:tmr232,项目名称:Sark,代码行数:33,代码来源:highlight_calls.py

示例7: _install_load_file

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [as 别名]
def _install_load_file(self):
        """
        Install the 'File->Load->Code coverage file...' menu entry.
        """

        # create a custom IDA icon
        icon_path = plugin_resource(os.path.join("icons", "load.png"))
        icon_data = open(icon_path, "rb").read()
        self._icon_id_file = idaapi.load_custom_icon(data=icon_data)

        # describe a custom IDA UI action
        action_desc = idaapi.action_desc_t(
            self.ACTION_LOAD_FILE,                   # The action name
            "~C~ode coverage file...",               # The action text
            IDACtxEntry(self.interactive_load_file), # The action handler
            None,                                    # Optional: action shortcut
            "Load individual code coverage file(s)", # Optional: tooltip
            self._icon_id_file                       # Optional: the action icon
        )

        # register the action with IDA
        result = idaapi.register_action(action_desc)
        if not result:
            RuntimeError("Failed to register load_file action with IDA")

        # attach the action to the File-> dropdown menu
        result = idaapi.attach_action_to_menu(
            "File/Load file/",      # Relative path of where to add the action
            self.ACTION_LOAD_FILE,  # The action ID (see above)
            idaapi.SETMENU_APP      # We want to append the action after ^
        )
        if not result:
            RuntimeError("Failed action attach load_file")

        logger.info("Installed the 'Code coverage file' menu entry") 
开发者ID:gaasedelen,项目名称:lighthouse,代码行数:37,代码来源:ida_integration.py

示例8: _install_load_batch

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [as 别名]
def _install_load_batch(self):
        """
        Install the 'File->Load->Code coverage batch...' menu entry.
        """

        # create a custom IDA icon
        icon_path = plugin_resource(os.path.join("icons", "batch.png"))
        icon_data = open(icon_path, "rb").read()
        self._icon_id_batch = idaapi.load_custom_icon(data=icon_data)

        # describe a custom IDA UI action
        action_desc = idaapi.action_desc_t(
            self.ACTION_LOAD_BATCH,                   # The action name
            "~C~ode coverage batch...",               # The action text
            IDACtxEntry(self.interactive_load_batch), # The action handler
            None,                                     # Optional: action shortcut
            "Load and aggregate code coverage files", # Optional: tooltip
            self._icon_id_batch                       # Optional: the action icon
        )

        # register the action with IDA
        result = idaapi.register_action(action_desc)
        if not result:
            RuntimeError("Failed to register load_batch action with IDA")

        # attach the action to the File-> dropdown menu
        result = idaapi.attach_action_to_menu(
            "File/Load file/",      # Relative path of where to add the action
            self.ACTION_LOAD_BATCH, # The action ID (see above)
            idaapi.SETMENU_APP      # We want to append the action after ^
        )
        if not result:
            RuntimeError("Failed action attach load_batch")

        logger.info("Installed the 'Code coverage batch' menu entry") 
开发者ID:gaasedelen,项目名称:lighthouse,代码行数:37,代码来源:ida_integration.py

示例9: attach_to_menu

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [as 别名]
def attach_to_menu(self, menu):
        assert hasattr(self, "name")
        idaapi.attach_action_to_menu(menu, self.name, idaapi.SETMENU_APP) 
开发者ID:cea-sec,项目名称:miasm,代码行数:5,代码来源:menu.py

示例10: _attach_to_menu_items

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [as 别名]
def _attach_to_menu_items(self):

        self.search_magic_desc = idaapi.action_desc_t(
            'idamagnum:searchmagic',             
            'search magic number ...',              
            SearchMagicNumber(self),         
            "Shift+M",                     
            'Search this value on MagnumDB', 
        )

        self.configure_plugin_desc = idaapi.action_desc_t(
            'idamagnum:configure',             
            'Configure',              
            ConfigureIdaMagnum(self),         
            "",                     
            'Configure plugin',
        )

        idaapi.register_action(self.search_magic_desc)
        idaapi.register_action(self.configure_plugin_desc)

        idaapi.attach_action_to_menu(
            'Edit/Plugins/IdaMagnum/',
            'idamagnum:searchmagic',
            idaapi.SETMENU_APP
        )

        idaapi.attach_action_to_menu(
            'Edit/Plugins/IdaMagnum/',
            'idamagnum:configure',
            idaapi.SETMENU_APP
        )

        return 0 
开发者ID:lucasg,项目名称:idamagnum,代码行数:36,代码来源:idamagnum_plugin.py

示例11: init

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [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

示例12: init_menu

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [as 别名]
def init_menu(action_handler):
    action = '{}:loadfile'.format(NAME)
    action_desc = idaapi.action_desc_t(
        action,
        '{}...'.format(NAME),
        action_handler,
        'Ctrl+Alt+J',
        '{} dependency browser'.format(NAME),
    )
    idaapi.register_action(action_desc)
    idaapi.attach_action_to_menu('File', action, idaapi.SETMENU_APP) 
开发者ID:yeggor,项目名称:UEFI_RETool,代码行数:13,代码来源:ui.py

示例13: init

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [as 别名]
def init(self):
        
        self.view = None

        # create watcher
        self.watch = Watcher()
    

        # setup actions
        self.actions = ActionManager()
        self.actions.register("addmenuwindow", "Add Watch", self.addWatchWindow, -1, "Shift-A")
        self.actions.register("showview", "Show WatchDbg List", self.showWatchWindow, -1, "Shift-W")


        # setup menus

        
        idaapi.attach_action_to_menu('Debugger/WatchDbg', self.actions.get("showview"), idaapi.SETMENU_APP)

        self.uihook = UIHook()
        
        self.uihook.hook()


        
        self.dbghook = WatchDbgHook()
        self.dbghook.dbg_suspend_process = self.updateWatchWindow
        self.dbghook.hook()

        
        
        writeline("Successfully loaded! [v.%s]" % '.'.join(map(str,PLUGIN_VERSION)))

        return idaapi.PLUGIN_KEEP 
开发者ID:Tekiter,项目名称:WatchDBG-IDA,代码行数:36,代码来源:plugin.py

示例14: init

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [as 别名]
def init():

        NO_HOTKEY = ""
        SETMENU_INS = 0
        NO_ARGS = tuple()

        config_action_text = "{} Config".format(ConfigStingray.PLUGIN_NAME)
        idaapi.register_action(idaapi.action_desc_t(ConfigStingray.ACTION_NAME, config_action_text, ConfigStingray()))
        idaapi.attach_action_to_menu("Options/", ConfigStingray.ACTION_NAME, idaapi.SETMENU_APP)
        ConfigStingray.load() 
开发者ID:darx0r,项目名称:Stingray,代码行数:12,代码来源:Stingray.py

示例15: init

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import SETMENU_APP [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


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