Python idaapi.unregister_action() Examples

The following are 24 code examples of idaapi.unregister_action(). These examples are extracted from open source projects. 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 Project: lighthouse   Author: gaasedelen   File: ida_integration.py    License: 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 #2
Source Project: lighthouse   Author: gaasedelen   File: ida_integration.py    License: 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 Project: lighthouse   Author: gaasedelen   File: ida_integration.py    License: 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 #4
Source Project: vt-ida-plugin   Author: VirusTotal   File: plugin_loader.py    License: Apache License 2.0 5 votes vote down vote up
def unregister(cls):
    idaapi.unregister_action(cls.get_name()) 
Example #5
Source Project: vt-ida-plugin   Author: VirusTotal   File: plugin_loader.py    License: Apache License 2.0 5 votes vote down vote up
def unregister(cls):
    idaapi.unregister_action(cls.get_name()) 
Example #6
Source Project: vt-ida-plugin   Author: VirusTotal   File: plugin_loader.py    License: Apache License 2.0 5 votes vote down vote up
def unregister(cls):
    idaapi.unregister_action(cls.get_name()) 
Example #7
Source Project: win_driver_plugin   Author: FSecureLABS   File: win_driver_plugin.py    License: 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 #8
Source Project: BRUTAL-IDA   Author: tmr232   File: brutal_ida.py    License: 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 #9
Source Project: DIE   Author: ynvb   File: DIE.py    License: 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 #10
Source Project: Sark   Author: tmr232   File: ui.py    License: 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 #11
Source Project: Sark   Author: tmr232   File: highlight_calls.py    License: 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 #12
Source Project: Sark   Author: tmr232   File: autoenum.py    License: 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 #13
Source Project: prefix   Author: gaasedelen   File: ida_prefix.py    License: 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 #14
Source Project: prefix   Author: gaasedelen   File: ida_prefix.py    License: 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 #15
Source Project: prefix   Author: gaasedelen   File: ida_prefix.py    License: 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 #16
Source Project: lighthouse   Author: gaasedelen   File: ida_integration.py    License: 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 #17
Source Project: IDAFuzzy   Author: Ga-ryo   File: ida_fuzzy.py    License: MIT License 5 votes vote down vote up
def term(self):
        idaapi.unregister_action("fz:fuzzysearch")
        pass 
Example #18
Source Project: LazyIDA   Author: L4ys   File: LazyIDA.py    License: 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 #19
Source Project: WatchDBG-IDA   Author: Tekiter   File: util.py    License: MIT License 5 votes vote down vote up
def cleanup(self):
        for i in self._actions:
            idaapi.unregister_action(i) 
Example #20
Source Project: Stingray   Author: darx0r   File: Stingray.py    License: 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 #21
Source Project: vxhunter   Author: PAGalaxyLab   File: vxhunter_ida.py    License: 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 #22
Source Project: findcrypt-yara   Author: polymorf   File: findcrypt3.py    License: 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 #23
Source Project: ida-scripts   Author: sam-b   File: neo4ida.py    License: 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 #24
Source Project: deREferencing   Author: danigargu   File: actions.py    License: 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)

# -----------------------------------------------------------------------