def term(self): """ This method is called when IDA is unloading the plugin. It will terminated all the modules, then save the configuration file. """ self.unhook() idaapi.term_hexrays_plugin()
def term(self): if self.ui_hook: self.ui_hook.unhook() self.ui_hook = None # Unregister actions if self.registered_hotkey_actions: for action in self.registered_hotkey_actions: idaapi.unregister_action(action) del self.registered_hotkey_actions[:] if self.registered_menu_actions: for action in self.registered_menu_actions: idaapi.unregister_action(action) del self.registered_menu_actions[:] if self.hexrays_inited: if self.hx_hook: idaapi.remove_hexrays_callback(self.hx_hook.callback) self.hx_hook = None # Unregister hexrays actions if self.registered_hexray_actions: for action in self.registered_hexray_actions: idaapi.unregister_action(action) del self.registered_hexray_actions[:] idaapi.term_hexrays_plugin() plg_print("plugin terminated")
def term(): if Helper.temporary_structure: Helper.temporary_structure.clear() # Actions.unregister(Actions.CreateVtable) if hex_pytools_config: for ac in hex_pytools_config.actions: if hex_pytools_config.actions[ac]: Actions.unregister(hex_pytools_config.actions_refs[ac]) # Actions.unregister(Actions.ShowGraph) # Actions.unregister(Actions.ShowClasses) # Actions.unregister(Actions.GetStructureBySize) # Actions.unregister(Actions.RemoveArgument) # Actions.unregister(Actions.AddRemoveReturn) # Actions.unregister(Actions.ConvertToUsercall) # Actions.unregister(Actions.ShallowScanVariable) # Actions.unregister(Actions.DeepScanVariable) # Actions.unregister(Actions.DeepScanReturn) # Actions.unregister(Actions.RecognizeShape) # Actions.unregister(Actions.SelectContainingStructure) # Actions.unregister(Actions.ResetContainingStructure) # Actions.unregister(Actions.RecastItemRight) # Actions.unregister(Actions.RecastItemLeft) # Actions.unregister(Actions.RenameOther) # Actions.unregister(Actions.RenameInside) # Actions.unregister(Actions.RenameOutside) idaapi.term_hexrays_plugin()
def term(): if Cache.temporary_structure: Cache.temporary_structure.clear() # Actions.unregister(Actions.CreateVtable) Actions.unregister(Actions.ShowGraph) Actions.unregister(Actions.ShowClasses) Actions.unregister(Actions.GetStructureBySize) Actions.unregister(Actions.RemoveArgument) Actions.unregister(Actions.AddRemoveReturn) Actions.unregister(Actions.ConvertToUsercall) Actions.unregister(Actions.ShallowScanVariable) Actions.unregister(Actions.DeepScanVariable) Actions.unregister(Actions.DeepScanReturn) Actions.unregister(Actions.DeepScanFunctions) Actions.unregister(Actions.RecognizeShape) Actions.unregister(Actions.CreateNewField) Actions.unregister(Actions.SelectContainingStructure) Actions.unregister(Actions.ResetContainingStructure) Actions.unregister(Actions.RecastItemRight) Actions.unregister(Actions.RecastItemLeft) Actions.unregister(Actions.RenameOther) Actions.unregister(Actions.RenameInside) Actions.unregister(Actions.RenameOutside) Actions.unregister(Actions.RenameUsingAssert) Actions.unregister(Actions.SwapThenElse) Actions.unregister(Actions.FindFieldXrefs) Actions.unregister(Actions.PropagateName) Actions.unregister(Actions.GuessAllocation) idaapi.term_hexrays_plugin() XrefStorage().close()
def term(): if Helper.temporary_structure: Helper.temporary_structure.clear() Actions.unregister(Actions.CreateVtable) Actions.unregister(Actions.ShowGraph) Actions.unregister(Actions.ShowClasses) Actions.unregister(Actions.GetStructureBySize) Actions.unregister(Actions.RemoveArgument) Actions.unregister(Actions.AddRemoveReturn) Actions.unregister(Actions.ConvertToUsercall) Actions.unregister(Actions.ShallowScanVariable) Actions.unregister(Actions.DeepScanVariable) Actions.unregister(Actions.DeepScanReturn) Actions.unregister(Actions.DeepScanFunctions) Actions.unregister(Actions.RecognizeShape) Actions.unregister(Actions.CreateNewField) Actions.unregister(Actions.SelectContainingStructure) Actions.unregister(Actions.ResetContainingStructure) Actions.unregister(Actions.RecastItemRight) Actions.unregister(Actions.RecastItemLeft) Actions.unregister(Actions.RenameOther) Actions.unregister(Actions.RenameInside) Actions.unregister(Actions.RenameOutside) Actions.unregister(Actions.SwapThenElse) idaapi.term_hexrays_plugin()
def term(self): if 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()
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() print("[LazyIDA] plugin terminated.")
import idaapi def main(): if not idaapi.init_hexrays_plugin(): return False print "Hex-rays version %s has been detected" % idaapi.get_hexrays_version( ) f = idaapi.get_func(idaapi.get_screen_ea()) if f is None: print "Please position the cursor within a function" return True cfunc = idaapi.decompile(f) if cfunc is None: print "Failed to decompile!" return True sv = cfunc.get_pseudocode() for i in xrange(0, sv.size()): line = idaapi.tag_remove(str(sv[i])) print line return True if main(): idaapi.term_hexrays_plugin()
import idaapi def main(): if not idaapi.init_hexrays_plugin(): return False print "Hex-rays version %s has been detected" % idaapi.get_hexrays_version() f = idaapi.get_func(idaapi.get_screen_ea()); if f is None: print "Please position the cursor within a function" return True cfunc = idaapi.decompile(f); if cfunc is None: print "Failed to decompile!" return True sv = cfunc.get_pseudocode(); for sline in sv: print idaapi.tag_remove(sline.line); return True if main(): idaapi.term_hexrays_plugin();
def term(self): if self.inited: if not idaapi.remove_hexrays_callback(callback): log.warn("Failed to remove hexrays callback") idaapi.term_hexrays_plugin()
def term(self): if self.hexrays_inited: idaapi.term_hexrays_plugin()
def term(): action_manager.finalize() hx_callback_manager.finalize() XrefStorage().close() idaapi.term_hexrays_plugin()
def term(self): """Terminate Plugin.""" try: idaapi.term_hexrays_plugin() except AttributeError: pass
def term(self): if self.inited: idaapi.remove_hexrays_callback(callback) idaapi.term_hexrays_plugin()