我们从Python开源项目中,提取了以下11个代码示例,用于说明如何使用idaapi.unregister_action()。
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")
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")
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
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
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 #------------------------------------------------------------------------------
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") #-------------------------------------------------------------------------- # UI - Actions #--------------------------------------------------------------------------
def unregister(action): idaapi.unregister_action(action.name)
def term(self): self.disable_highlights() idaapi.unregister_action(self.toggle_action_desc.name) idaapi.unregister_action(self.color_selector.name)
def unregisterAction(self): idaapi.detach_action_from_menu(self.menuPath, self.id) idaapi.unregister_action(self.id)
def _del_action_bulk(self): idaapi.unregister_action(self.ACTION_BULK) idaapi.free_custom_icon(self._bulk_icon_id) self._bulk_icon_id = idaapi.BADADDR
def _del_action_copy(self): idaapi.unregister_action(self.ACTION_COPY) #idaapi.free_custom_icon(self._copy_icon_id) self._copy_icon_id = idaapi.BADADDR #------------------------------------------------------------------------------ # Plugin Hooks #------------------------------------------------------------------------------