当前位置: 首页>>代码示例>>Python>>正文


Python idaapi.is_debugger_on方法代码示例

本文整理汇总了Python中idaapi.is_debugger_on方法的典型用法代码示例。如果您正苦于以下问题:Python idaapi.is_debugger_on方法的具体用法?Python idaapi.is_debugger_on怎么用?Python idaapi.is_debugger_on使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在idaapi的用法示例。


在下文中一共展示了idaapi.is_debugger_on方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: prepare_debug_ui

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import is_debugger_on [as 别名]
def prepare_debug_ui(self):
		if idaapi.is_debugger_on():
			idaapi.warning("[%s] the debugger is currently running" % PLUGNAME)
			return

		wd = WaitDialog()
		idaapi.msg("[%s] waiting...\n" % (PLUGNAME))
		wd.thread.start()
		wd.exec_()

		target_pid = wd.get_target_pid()
		if target_pid != -1:
			ida_dbg.attach_process(target_pid,-1)
			ida_dbg.wait_for_next_event(ida_dbg.WFNE_SUSP, -1)
			ida_dbg.continue_process()
		else:
			idaapi.msg("[%s] exit waiting\n" % (PLUGNAME)) 
开发者ID:anic,项目名称:ida2pwntools,代码行数:19,代码来源:ida2pwntools.py

示例2: is_active

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import is_debugger_on [as 别名]
def is_active(self):
        return idaapi.is_debugger_on() and idaapi.dbg_can_query()
    
    #------------------------------------- 
开发者ID:andreafioraldi,项目名称:IDAngr,代码行数:6,代码来源:ida_debugger.py

示例3: main

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import is_debugger_on [as 别名]
def main():
    if not idaapi.is_debugger_on():
        idc.Warning("Please run the process first!")
        return
    if idaapi.get_process_state() != -1:
        idc.Warning("Please suspend the debugger first!")
        return

    # only avail from IdaPython r232
    if hasattr(idaapi, "NearestName"):
        # get all debug names
        dn = idaapi.get_debug_names(idaapi.cvar.inf.minEA, idaapi.cvar.inf.maxEA)
        # initiate a nearest name search (using debug names)
        nn = idaapi.NearestName(dn)
    else:
        nn = None

    ret, callstack = CallStackWalk(nn)
    if ret:
        title = "Call stack walker (thread %X)" % (GetCurrentThreadId())
        idaapi.close_chooser(title)
        c = CallStackWalkChoose(callstack, title)
        c.choose()
    else:
        idc.Warning("Failed to walk the stack:" + callstack)

# ----------------------------------------------------------------------- 
开发者ID:joxeankoret,项目名称:nightmare,代码行数:29,代码来源:CallStackWalk.py

示例4: __call__

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import is_debugger_on [as 别名]
def __call__(self):
		target_pid = -1

		if idaapi.is_debugger_on():
			idaapi.msg("[%s] the debugger is currently running\n" % PLUGNAME)
			return -1

		if not self.times%5:
			idaapi.msg("[%s] waiting for the process (%ds left)...\n" % \
				(PLUGNAME, self.times))

		filename = ida_nalt.get_root_filename()
		pis = ida_idd.procinfo_vec_t()
		ida_dbg.get_processes(pis)

		for proc in pis:
			proc_name = proc.name.split(" ")[1]
			idx = proc_name.rfind("/")

			if idx != -1:
				proc_name = proc_name[idx+1:]

			if filename == proc_name:
				target_pid = proc.pid
				break

		if target_pid != -1:
			idaapi.msg("[%s] found. start debug (PID: %d)\n" % (PLUGNAME, target_pid))
			ida_dbg.attach_process(target_pid, -1)
			ida_dbg.wait_for_next_event(ida_dbg.WFNE_SUSP, -1)
			ida_dbg.continue_process()
			return -1

		self.times -= 1
		return -1 if self.times == 0 else self.interval 
开发者ID:anic,项目名称:ida2pwntools,代码行数:37,代码来源:ida2pwntools.py

示例5: run

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import is_debugger_on [as 别名]
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))) 
开发者ID:danigargu,项目名称:heap-viewer,代码行数:15,代码来源:heap_viewer.py

示例6: getImportTableData

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import is_debugger_on [as 别名]
def getImportTableData(self):
        """
        Update rt_import_table with current import table data.
        """

        def imp_cb(ea, name, ord):
            """
            Import enumeration callback function. used by idaapi.enum_import_names .
            """
            tmpImports.append([self.current_module_name, ea, name, ord])
            return True

        tmpImports = []  # Contains static import table data (w\o real function addresses)
        imp_num = idaapi.get_import_module_qty()  # Number of imported modules

        for i in xrange(0, imp_num):
            self.current_module_name = idaapi.get_import_module_name(i).lower()
            idaapi.enum_import_names(i, imp_cb)

        #  Get runtime function addresses and store in self.rt_import_table
        if not idaapi.is_debugger_on():
            raise RuntimeError("Debugger is not currently active.")

        for module_name, ea, name, ord in tmpImports:
            func_real_adrs = get_adrs_mem(ea)
            self.rt_import_table[func_real_adrs] = (module_name, ea, name, ord) 
开发者ID:ynvb,项目名称:DIE,代码行数:28,代码来源:DbgImports.py


注:本文中的idaapi.is_debugger_on方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。