Exemplo n.º 1
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
     return 300
Exemplo n.º 2
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
Exemplo n.º 3
0
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]))
Exemplo n.º 4
0
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)
Exemplo n.º 5
0
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 check_memory_region(is_arch64):
    if ida_dbg.is_debugger_on():
        if ida_kernwin.ask_buttons(
                "Yes", "No", "Cancel", -1,
                "Add auto memory region (without memory region go to EIP/RIP can fail)"
        ) == -1:
            raise UICancel
        ida_dbg.enable_manual_regions(1)
        infos = ida_idd.meminfo_vec_t()
        info = ida_idd.memory_info_t()
        info.perm = 7
        if is_arch64:
            info.end_ea = 18446744073709551614
            info.bitness = 2
        else:
            info.end_ea = 4294967294
            info.bitness = 1
        info.sbase = 0
        info.sclass = 'UNK'
        info.name = 'MEMORY'
        info.start_ea = 0
        infos.push_back(info)
        ida_dbg.set_manual_regions(infos)
        # enable manual regions workarr:
        ida_dbg.enable_manual_regions(0)
        ida_dbg.refresh_debugger_memory()
        ida_dbg.enable_manual_regions(1)
        ida_dbg.refresh_debugger_memory()
        ida_dbg.edit_manual_regions()
        if idaapi.get_process_state() == -1:
            if is_arch64:
                cipreg = idaapi.get_reg_val('RIP')
            else:
                cipreg = idaapi.get_reg_val('EIP')
            ida_ua.create_insn(cipreg)
            ida_kernwin.jumpto(cipreg)
            ida_kernwin.refresh_idaview_anyway()