Python idaapi.unregister_action() Examples

The following are 24 code examples of idaapi.unregister_action(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module idaapi , or try the search function .
Example #1
Source File: ida_integration.py    From lighthouse with MIT License 6 votes vote down vote up
def _uninstall_open_coverage_xref(self):
        """
        Remove the right click 'Coverage Xref' context menu entry.
        """
        self._ui_hooks.unhook()

        # unregister the action
        result = idaapi.unregister_action(self.ACTION_COVERAGE_XREF)
        if not result:
            return False

        # delete the entry's icon
        idaapi.free_custom_icon(self._icon_id_xref)
        self._icon_id_xref = idaapi.BADADDR

        logger.info("Uninstalled the 'Coverage Xref' menu entry") 
Example #2
Source File: ida_integration.py    From lighthouse with MIT License 6 votes vote down vote up
def _uninstall_load_batch(self):
        """
        Remove the 'File->Load file->Code coverage batch...' menu entry.
        """

        # remove the entry from the File-> menu
        result = idaapi.detach_action_from_menu(
            "File/Load file/",
            self.ACTION_LOAD_BATCH
        )
        if not result:
            return False

        # unregister the action
        result = idaapi.unregister_action(self.ACTION_LOAD_BATCH)
        if not result:
            return False

        # delete the entry's icon
        idaapi.free_custom_icon(self._icon_id_batch)
        self._icon_id_batch = idaapi.BADADDR

        logger.info("Uninstalled the 'Code coverage batch' menu entry") 
Example #3
Source File: ida_integration.py    From lighthouse with MIT License 6 votes vote down vote up
def _uninstall_load_file(self):
        """
        Remove the 'File->Load file->Code coverage file...' menu entry.
        """

        # remove the entry from the File-> menu
        result = idaapi.detach_action_from_menu(
            "File/Load file/",
            self.ACTION_LOAD_FILE
        )
        if not result:
            return False

        # unregister the action
        result = idaapi.unregister_action(self.ACTION_LOAD_FILE)
        if not result:
            return False

        # delete the entry's icon
        idaapi.free_custom_icon(self._icon_id_file)
        self._icon_id_file = idaapi.BADADDR

        logger.info("Uninstalled the 'Code coverage file' menu entry") 
Example #4
Source File: actions.py    From deREferencing with GNU General Public License v3.0 5 votes vote down vote up
def unregister_menu_actions(form):
    for action in form.menu_actions:
        if action.name == "-":
            continue

        act_name = "%s:%s" % (PLUGIN_NAME, action.name)
        idaapi.unregister_action(act_name)

# ----------------------------------------------------------------------- 
Example #5
Source File: plugin_loader.py    From vt-ida-plugin with Apache License 2.0 5 votes vote down vote up
def unregister(cls):
    idaapi.unregister_action(cls.get_name()) 
Example #6
Source File: neo4ida.py    From ida-scripts with The Unlicense 5 votes vote down vote up
def unregisterAction(self):
        idaapi.detach_action_from_menu(self.menuPath, self.id)
        idaapi.unregister_action(self.id) 
Example #7
Source File: findcrypt3.py    From findcrypt-yara with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def unregister(self):
            """Unregister the action.
            After unregistering the class cannot be used.
            """
            idaapi.unregister_action(self.get_name()) 
Example #8
Source File: vxhunter_ida.py    From vxhunter with BSD 2-Clause "Simplified" License 5 votes vote down vote up
def unregister(self):
            """Unregister the action.
            After unregistering the class cannot be used.
            """
            idaapi.unregister_action(self.get_name()) 
Example #9
Source File: Stingray.py    From Stingray with GNU General Public License v3.0 5 votes vote down vote up
def destory():

        idaapi.unregister_action(ConfigStingray.ACTION_NAME)
        
        try:
            ConfigStingray.save()
        except IOError:
            logger.warning("Failed to write config file") 
Example #10
Source File: util.py    From WatchDBG-IDA with MIT License 5 votes vote down vote up
def cleanup(self):
        for i in self._actions:
            idaapi.unregister_action(i) 
Example #11
Source File: LazyIDA.py    From LazyIDA with MIT License 5 votes vote down vote up
def term(self):
        if hasattr(self, "ui_hook"):
            self.ui_hook.unhook()

        # Unregister actions
        for action in self.registered_actions:
            idaapi.unregister_action(action)

        if self.hexrays_inited:
            # Unregister hexrays actions
            for action in self.registered_hx_actions:
                idaapi.unregister_action(action)
            if self.hx_hook:
                idaapi.remove_hexrays_callback(self.hx_hook.callback)
            idaapi.term_hexrays_plugin() 
Example #12
Source File: ida_fuzzy.py    From IDAFuzzy with MIT License 5 votes vote down vote up
def term(self):
        idaapi.unregister_action("fz:fuzzysearch")
        pass 
Example #13
Source File: ida_integration.py    From lighthouse with MIT License 5 votes vote down vote up
def _uninstall_open_coverage_overview(self):
        """
        Remove the 'View->Open subviews->Coverage Overview' menu entry.
        """

        # remove the entry from the View-> menu
        result = idaapi.detach_action_from_menu(
            "View/Open subviews/Hex dump",
            self.ACTION_COVERAGE_OVERVIEW
        )
        if not result:
            return False

        # unregister the action
        result = idaapi.unregister_action(self.ACTION_COVERAGE_OVERVIEW)
        if not result:
            return False

        # delete the entry's icon
        idaapi.free_custom_icon(self._icon_id_overview)
        self._icon_id_overview = idaapi.BADADDR

        logger.info("Uninstalled the 'Coverage Overview' menu entry")

    #--------------------------------------------------------------------------
    # Helpers
    #-------------------------------------------------------------------------- 
Example #14
Source File: ida_prefix.py    From prefix with MIT License 5 votes vote down vote up
def _del_action_recursive(self):
        """
        Delete the recursive rename action from IDA.
        """
        idaapi.unregister_action(self.ACTION_RECURSIVE)
        idaapi.free_custom_icon(self._recursive_icon_id)
        self._recursive_icon_id = idaapi.BADADDR

#------------------------------------------------------------------------------
# Plugin Hooks
#------------------------------------------------------------------------------ 
Example #15
Source File: ida_prefix.py    From prefix with MIT License 5 votes vote down vote up
def _del_action_clear(self):
        """
        Delete the clear prefix action from IDA.
        """
        idaapi.unregister_action(self.ACTION_CLEAR)
        idaapi.free_custom_icon(self._clear_icon_id)
        self._clear_icon_id = idaapi.BADADDR 
Example #16
Source File: ida_prefix.py    From prefix with MIT License 5 votes vote down vote up
def _del_action_bulk(self):
        """
        Delete the bulk prefix action from IDA.
        """
        idaapi.unregister_action(self.ACTION_BULK)
        idaapi.free_custom_icon(self._bulk_icon_id)
        self._bulk_icon_id = idaapi.BADADDR 
Example #17
Source File: autoenum.py    From Sark with MIT License 5 votes vote down vote up
def term(self):
        idaapi.unregister_action(self.autoenum_action_desc.name)
        idaapi.unregister_action(self.rename_action_desc.name) 
Example #18
Source File: highlight_calls.py    From Sark with MIT License 5 votes vote down vote up
def term(self):
        self.disable_highlights()
        idaapi.unregister_action(self.toggle_action_desc.name)
        idaapi.unregister_action(self.color_selector.name) 
Example #19
Source File: ui.py    From Sark with MIT License 5 votes vote down vote up
def unregister(cls):
        """Unregister the action.

        After unregistering the class cannot be used.
        """
        idaapi.unregister_action(cls.get_name()) 
Example #20
Source File: DIE.py    From DIE with MIT License 5 votes vote down vote up
def del_menu_items(self):
        for menu_name in self._menus_names:
            idaapi.unregister_action(menu_name)
        idaapi.delete_menu("DIE")


    ###########################################################################
    # Debugging 
Example #21
Source File: brutal_ida.py    From BRUTAL-IDA with MIT License 5 votes vote down vote up
def init(brutal_self):
        idaapi.unregister_action('Undo')
        idaapi.unregister_action('Redo')

        brutal_self.brutal_action_handler = BrutalActionHandler()
        brutal_action_desc = idaapi.action_desc_t('BRUTAL', 'BRUTAL IDA', brutal_self.brutal_action_handler, '',
                                                  'IDA', BRUTAL6_ICON)
        idaapi.register_action(brutal_action_desc)
        idaapi.create_toolbar('BRUTAL IDA', 'BRUTAL IDA')

        brutal_self.brutal_letter_handlers = []

        for brutal_letter in 'BRUTAL':
            brutal_letter_handler = BrutalLetterHandler()
            brutal_self.brutal_letter_handlers.append(brutal_letter_handler)

            brutal_label = 'BRUTAL {}'.format(brutal_letter)
            brutal_letter_desc = idaapi.action_desc_t(brutal_label,
                                                      brutal_label,
                                                      brutal_letter_handler,
                                                      '',
                                                      brutal_letter,
                                                      BRUTAL_LETTERS[brutal_letter])
            idaapi.register_action(brutal_letter_desc)
            idaapi.attach_action_to_toolbar('BRUTAL IDA', brutal_label)

        idaapi.attach_action_to_toolbar('BRUTAL IDA', 'BRUTAL')

        brutal_self.brutal_hotkey = idaapi.add_hotkey('Ctrl+Z', brutal_self.dispatch_brutality)

        return idaapi.PLUGIN_KEEP 
Example #22
Source File: win_driver_plugin.py    From win_driver_plugin with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def unregisterAction(self):
        idaapi.detach_action_from_menu(self.menuPath, self.id)
        idaapi.unregister_action(self.id) 
Example #23
Source File: plugin_loader.py    From vt-ida-plugin with Apache License 2.0 5 votes vote down vote up
def unregister(cls):
    idaapi.unregister_action(cls.get_name()) 
Example #24
Source File: plugin_loader.py    From vt-ida-plugin with Apache License 2.0 5 votes vote down vote up
def unregister(cls):
    idaapi.unregister_action(cls.get_name())