def _flash_cb(self): if self.pw: # if debugger is running and process is suspended if is_debugger_on() and get_process_state() == -1: self.pw.on_filter_request_update() self.highlighted = not self.highlighted return 300
def do_trace(then_quit_ida=True): debugHook = TraceHook() debugHook.hook() # Start tracing when entry point is hit ep = ida_ida.inf_get_start_ip() ida_dbg.enable_step_trace(1) ida_dbg.set_step_trace_options(ida_dbg.ST_OVER_DEBUG_SEG | ida_dbg.ST_OVER_LIB_FUNC) print("Running to %x" % ep) ida_dbg.run_to(ep) while ida_dbg.get_process_state() != 0: ida_dbg.wait_for_next_event(1, 0) if not debugHook.epReached: raise Exception("Entry point wasn't reached!") if not debugHook.unhook(): raise Exception("Error uninstalling hooks!") del debugHook if then_quit_ida: # we're done; exit IDA ida_pro.qexit(0)
def _flash_cb(self): if self.pw: # if debugger is running and process is suspended if is_debugger_on() and get_process_state() == -1: self.pw.on_filter_request_update() self.highlighted = not self.highlighted # timer will unregister itself if it returns -1 return 200
def main(): if not ida_dbg.is_debugger_on(): print("Please run the process first!") return if ida_dbg.get_process_state() != -1: print("Please suspend the debugger first!") return dn = ida_name.get_debug_names(ida_ida.inf_get_min_ea(), ida_ida.inf_get_max_ea()) for i in dn: print("%08x: %s" % (i, dn[i]))
def main(): if not ida_dbg.is_debugger_on(): ida_kernwin.warning("Please run the process first!") return if ida_dbg.get_process_state() != -1: ida_kernwin.warning("Please suspend the debugger first!") return # get all debug namesp dn = ida_name.get_debug_names(ida_ida.cvar.inf.min_ea, ida_ida.cvar.inf.max_ea) # initiate a nearest name search (using debug names) nn = ida_name.NearestName(dn) ret, callstack = CallStackWalk(nn) if ret: title = "Call stack walker (thread %X)" % (ida_dbg.get_current_thread()) ida_kernwin.close_chooser(title) c = CallStackWalkChoose(title, callstack) c.Show(True) else: ida_kernwin.warning("Failed to walk the stack:" + callstack)
def main(): if not ida_dbg.is_debugger_on(): ida_kernwin.warning("Please run the process first!") return if ida_dbg.get_process_state() != -1: ida_kernwin.warning("Please suspend the debugger first!") return # get all debug namesp dn = ida_name.get_debug_names(ida_ida.cvar.inf.min_ea, ida_ida.cvar.inf.max_ea) # initiate a nearest name search (using debug names) nn = ida_name.NearestName(dn) ret, callstack = CallStackWalk(nn) if ret: title = "Call stack walker (thread %X)" % (ida_dbg.get_current_thread()) ida_kernwin.close_chooser(title) c = CallStackWalkChoose(title, callstack) c.Show(True) else: ida_kernwin.warning("Failed to walk the stack:" + callstack)