def run(self, arg=0): try: if "ELF" not in idaapi.get_file_type_name(): raise Exception("Executable must be ELF fomat") if not idaapi.is_debugger_on() or not is_process_suspended(): raise Exception("The debugger must be active and suspended before using this plugin") f = plugin_gui.HeapPluginForm() f.Show() except Exception as e: idaapi.warning("[%s] %s" % (PLUGNAME, str(e)))
def reload_gui_info(self, from_arena_cb=False): if self.heap is None: return try: if not misc.is_process_suspended(): answer = idaapi.askyn_c( idaapi.ASKBTN_YES, "HIDECANCEL\nThe process must be suspended to reload the info.\n\ Do you want to suspend it?") if answer == idaapi.ASKBTN_NO: return if not idaapi.suspend_process(): warning("Unable to suspend the process") return idaapi.refresh_debugger_memory() if not self.heap.get_heap_base(): self.show_warning("Heap not initialized") return if not config.libc_base: self.show_warning("Unable to resolve glibc base address.") return self.hide_warning() self.arenas_widget.setVisible(True) if not from_arena_cb: self.populate_arenas() self.arena_widget.populate_table() self.tcache_widget.populate_table() self.bins_widget.populate_tables() except Exception as e: self.show_warning(e.message) idaapi.warning(traceback.format_exc())