Example #1
0
 def add_menu_items(self):
     idaapi.create_menu(self.wanted_name, self.wanted_name)
     self.add_menu_item_helper(
         MenuAskEntryId,
         "Set Mixto Entry ID",
         "Specify entry id to send subsequent data",
         -1,
         "",
     )
     self.add_menu_item_helper(
         MenuAllFunc,
         "Send all functions",
         "Send all function names and addresses to mixto",
         -1,
         "",
     )
     self.add_menu_item_helper(
         MenuDecFunc,
         "Send decompilation of selected function",
         "Send decompilation of selected function to mixto",
         -1,
         "",
     )
     self.add_menu_item_helper(MenuImports, "Send all imports",
                               "Send all imports to mixto", -1, "")
     self.add_menu_item_helper(MenuExports, "Send all exports",
                               "Send all exports to mixto", -1, "")
     self.add_menu_item_helper(
         MenuAllComments,
         "Send all comments",
         "Send all comments and respective addresses to mixto",
         -1,
         "",
     )
Example #2
0
    def register_actions(self):
        toolbar_name, menupath = self.name, self.name
        idaapi.create_toolbar(toolbar_name, self.name)
        idaapi.create_menu(menupath, self.name, "Help")

        UIManager.ActionHandler(self.name, self.name).register_action(self.binaryai_callback, toolbar_name)
        action = UIManager.ActionHandler("BinaryAI:About", "About", "")
        action.register_action(self.binaryai_callback, menupath=menupath)
        action = UIManager.ActionHandler("BinaryAI:RetrieveFunction", "Retrieve function", "Ctrl+Shift+d", icon=99)
        action.register_action(self.retrieve_callback, toolbar_name, menupath)
        action = UIManager.ActionHandler("BinaryAI:UploadFunction", "Upload function", "", icon=97)
        action.register_action(self.upload_callback, toolbar_name, menupath)
        action = UIManager.ActionHandler("BinaryAI:MatchAll", "Match all functions", "", icon=188)
        action.register_action(self.match_all_callback, toolbar_name, menupath)
        action = UIManager.ActionHandler("BinaryAI:UploadAll", "Upload all functions", "", icon=88)
        action.register_action(self.upload_all_callback, toolbar_name, menupath)

        apply_action = UIManager.ActionHandler("BinaryAI:Apply", "Apply")
        apply_action.register_action(self.apply_callback)

        match_action = UIManager.ActionHandler("BinaryAI:MatchSelected", "Match")
        upload_action = UIManager.ActionHandler("BinaryAI:UploadSelected", "Upload")
        revert_action = UIManager.ActionHandler("BinaryAI:RevertSelected", "Revert")
        if match_action.register_action(self.selected_callback) and \
                upload_action.register_action(self.selected_callback) and \
                revert_action.register_action(self.selected_callback):
            self.hooks.hook()
            return True
        return False
    def init(self):

        print('# PS4 Name2NID Plugin')

        if idaapi.IDA_SDK_VERSION < 700:

            print('Error: This plugin has only been tested on 7.0+')
            return PLUGIN_SKIP

        else:
            # Load Aerolib...
            #NIDS = load_nids('loaders', AEROLIB)

            idaapi.create_menu('PS4', 'PS4')

            action_desc = idaapi.action_desc_t('NIDify', 'NIDify',
                                               NIDify_Handler(), 'Ctrl+N',
                                               'NIDify the selected name', 199)
            idaapi.register_action(action_desc)
            idaapi.attach_action_to_menu('PS4/NIDify', 'NIDify',
                                         idaapi.SETMENU_APP)
            '''
            action_desc = idaapi.action_desc_t('Print NIDs', 'Print NIDs', Print_Handler(), 'Ctrl+H', 'Print the New NIDs', 199)
            idaapi.register_action(action_desc)
            idaapi.attach_action_to_menu('PS4/Print NIDs', 'Print NIDs', idaapi.SETMENU_APP)
            
            action_desc = idaapi.action_desc_t('Save NIDs', 'Save NIDs', Save_Handler(), 'Ctrl+Y', 'Save the New NIDs', 199)
            idaapi.register_action(action_desc)
            idaapi.attach_action_to_menu('PS4/Save NIDs', 'Save NIDs', idaapi.SETMENU_APP)
            '''
            return PLUGIN_KEEP
Example #4
0
File: DIE.py Project: waders909/DIE
    def add_menu_items(self):
        # Add root level menu
        idaapi.create_menu("DIE", "DIE")

        # Save DieDB
        self.add_menu_item_helper("DIE:savedb", "Save DieDB", 'DIE Save DieDB',
                                  self.DIE_save_db_Handler(self), self.icon_list["save"], '')

        # Load DieDB
        self.add_menu_item_helper("DIE:loaddb", "Load DieDB", 'DIE Load DieDB',
                                  self.DIE_load_db_Handler(self), self.icon_list["load"], '')

        # Show complete execution CFG
        self.add_menu_item_helper("DIE:showcfg", "Show CFG", 'DIE Show CFG',
                                  self.DIE_show_cfg_Handler(self), -1, '')

        # Mark\Unmark Execution Flow
        self.add_menu_item_helper("DIE:markexecutionflow", "Mark\Unmark Execution Flow",
                                  'DIE Mark\Unmark Execution Flow', self.DIE_mark_execflow_Handler(self), -1, '')

        # Parser View
        self.add_menu_item_helper("DIE:parsersview", "Parsers View", 'DIE Parsers View',
                                  self.DIE_show_parsersview_Handler(self), self.icon_list["plugins"], '')

        # Exceptions View
        self.add_menu_item_helper("DIE:exceptionsview", "Exceptions View", 'DIE Exceptions View',
                                  self.DIE_show_exceptionsview_Handler(self), self.icon_list["exception_view"], '')

        # Value View
        self.add_menu_item_helper("DIE:valueview", "Value View", 'DIE Value View',
                                  self.DIE_show_valview_Handler(self), self.icon_list["value_view"], '')

        # Function View
        self.add_menu_item_helper("DIE:functionview", "Function View", 'DIE Function View',
                                  self.DIE_show_funcview_Handler(self), self.icon_list["function_view"], '')

        # Debug a custom scope
        self.add_menu_item_helper("DIE:debugcustomscope", "Debug a custom scope", 'DIE Debug a custom scope',
                                  self.DIE_goscope_Handler(self), self.icon_list["debug_scope"], 'Ctrl+Alt+c')

        # Debug entire code
        self.add_menu_item_helper("DIE:debugentirecode", "Debug entire code", 'DIE Debug entire code',
                                  self.DIE_goall_Handler(self), self.icon_list["debug_scope"], 'Ctrl+Alt+g')

        # Debug from current location
        self.add_menu_item_helper("DIE:gofromcurrentlocation", "Debug from current location", 'DIE from current location',
                                  self.DIE_gohere_Handler(self), self.icon_list["debug"], 'Ctrl+Alt+f')

        # Settings
        self.add_menu_item_helper("DIE:settings", "Settings", 'DIE Settings',
                                  self.DIE_show_settings_Handler(self), self.icon_list["settings"], '')

        # About
        self.add_menu_item_helper("DIE:about", "About", 'DIE About',
                                  self.DIE_show_about_Handler(self), -1, '')
Example #5
0
 def register_actions(self):
     toolbar_name, menupath = self.name, self.name
     idaapi.create_toolbar(toolbar_name, self.name)
     idaapi.create_menu(menupath, self.name, "Help")
     action1 = UIManager.ActionHandler(self.name, self.name)
     action2 = UIManager.ActionHandler("BinaryAI:RetrieveFunction", "Retrieve function", "Ctrl+Shift+d", icon=199)
     action3 = UIManager.ActionHandler("BinaryAI:RetrieveAll", "Retrieve all functions", "", icon=188)
     action4 = UIManager.ActionHandler("BinaryAI:RetrieveSelected", "Retrieve")
     if action1.register_action(self.mgr.binaryai_callback, toolbar_name) and \
         action2.register_action(self.mgr.retrieve_function_callback, toolbar_name, menupath) and \
             action3.register_action(self.mgr.retrieve_all_callback, toolbar_name, menupath) and \
             action4.register_action(self.retrieve_selected_callback):
         self.hooks.hook()
         return True
     return False
Example #6
0
def create_miasm_menu():
	idaapi.create_menu("Miasm", "Miasm")
	
	handler_symb = Handler(symbolic_exec)
	handler_symb.register("miasm:symbexec", "Symbolic exec", shortcut="F3", icon=81)
	handler_symb.attach_to_menu("Miasm/Symbolic exec")
	handler_depgraph = Handler(launch_depgraph)
	handler_depgraph.register("miasm:depgraph", "Dependency graph", shortcut="F4", icon=79)
	handler_depgraph.attach_to_menu("Miasm/Dependency graph")
	
	handler_graph = Handler(function_graph_ir)
	handler_graph.register("miasm:graphir", "Graph IR", shortcut="F7", icon=188)
	handler_graph.attach_to_menu("Miasm/Graph IR")
	
	if serve_threaded is not None:
		handler_rpyc = Handler(serve_threaded)
		handler_rpyc.register("miasm:rpyc", "RPYC server", shortcut="F10", icon=182)
		handler_rpyc.attach_to_menu("Miasm/RPYC server")
	if analyse_function is not None:
		handler_ctype = Handler(analyse_function)
		handler_ctype.register("miasm:ctype", "Type propagation", shortcut="F11",
							icon=38)
		handler_ctype.attach_to_menu("Miasm/Type propagation")
Example #7
0
            label,  # The action text.
            self,  # The action handler.
            shortcut,  # Optional: the action shortcut
            tooltip,  # Optional: the action tooltip (available in menus/toolbar)
            icon,  # Optional: the action icon (shows when in menus/toolbars)
        )
        idaapi.register_action(action)
        self.name = name
        return action

    def attach_to_menu(self, menu):
        assert hasattr(self, "name")
        idaapi.attach_action_to_menu(menu, self.name, idaapi.SETMENU_APP)


idaapi.create_menu("Miasm", "Miasm")

handler_symb = Handler(symbolic_exec)
handler_symb.register("miasm:symbexec",
                      "Symbolic exec",
                      shortcut="F3",
                      icon=81)
handler_symb.attach_to_menu("Miasm/Symbolic exec")
handler_depgraph = Handler(launch_depgraph)
handler_depgraph.register("miasm:depgraph",
                          "Dependency graph",
                          shortcut="F4",
                          icon=79)
handler_depgraph.attach_to_menu("Miasm/Dependency graph")

handler_graph = Handler(function_graph_ir)