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


Python vtrace.getTrace函数代码示例

本文整理汇总了Python中vtrace.getTrace函数的典型用法代码示例。如果您正苦于以下问题:Python getTrace函数的具体用法?Python getTrace怎么用?Python getTrace使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: run

		def run(self):
			
			self.trace = vtrace.getTrace()
			self.trace.registerNotifier(vtrace.NOTIFY_SIGNAL, PeachNotifier())
			self.trace.execute(self._command + " " + self._params)
			UnixDebugger.started.set()
			self.trace.run()
开发者ID:flaub,项目名称:HotFuzz,代码行数:7,代码来源:debugger.py

示例2: load_binary

def load_binary(filepath, base=None):
    # Get the current trace object from vtrace
    trace = vtrace.getTrace()

    # If attempting to attach to a 64 bit process
    # 64 bit python is required.
    trace.execute(filepath)
    ###############################################################
    # The notifier class we want to register
    notif = CustomNotifier()
    # The list of events we want the notifier to handle
    eve = vtrace.NOTIFY_ALL
    # Tell our vtrace object that we want to capture all events with CustomNotifier
    trace.registerNotifier(eve, notif)
    ###############################################################
    # Call a function to set BP on OEP
    oep = v_api.getOEP(trace, filepath)

    # Set breakpoint at address
    bp = vtrace.Breakpoint(oep)
    trace.addBreakpoint(bp)

    # Start executing the program until you hit a breakpoint or it ends
    trace.run()
    #################################################################

    # Step 5 times into the program
    for i in range(5):
        trace.stepi()

    # Deregister our notifier
    trace.deregisterNotifier(eve, notif)
开发者ID:suto,项目名称:vtrace_scripts,代码行数:32,代码来源:simpleNotifier.py

示例3: getTrace

 def getTrace(self):
     trace = vtrace.getTrace()
     host,port = cobra.getLocalInfo()
     unique = md5.md5(os.urandom(20)).hexdigest()
     vtrace.cobra_daemon.shareObject(trace, unique)
     trace.proxy = cobra.CobraProxy("cobra://%s:%d/%s" % (host,port,unique))
     return unique
开发者ID:Fitblip,项目名称:vdb-fork,代码行数:7,代码来源:rmi.py

示例4: run_with_vivisect

def run_with_vivisect(binary, args, ttl):
    trace = vtrace.getTrace()

    logger.debug("Building Thread [{}]".format(load_binary))
    t = Thread(target=load_binary, args=(trace, binary, args))
    t.start()
    logger.debug("Sleeping for {} seconds.".format(ttl))
    sleep(ttl)

    if trace.isRunning():
        trace.sendBreak()
        # print_info(trace)

        logger.info("Death to the process {}".format(trace.getPid()))
        logger.debug("  (\  /)")
        logger.debug(" ( .  .)")
        logger.debug('C(") ("), done and no crash. Bunny is sad..')
        trace.kill()
        trace.detach()
        return NO_CRASH_RETURN
    else:
        # TODO: Seems that isRunning isn't working that well.
        logger.info("{} crashed!".format(binary))
        logger.info("Arguments: {}".format(", ".join(args)))
        print_info(trace)
        return CRASH_RETURN
开发者ID:Stolas,项目名称:Fizzled,代码行数:26,代码来源:autopsy.py

示例5: __init__

    def __init__(self, trace=None):
        v_notif.Notifier.__init__(self)
        v_util.TraceManager.__init__(self)

        if trace == None:
            trace = vtrace.getTrace()

        arch = trace.getMeta("Architecture")
        self.arch = envi.getArchModule(arch)
        self.difftracks = {}

        self.setMode("NonBlocking", True)

        self.manageTrace(trace)
        self.registerNotifier(vtrace.NOTIFY_ALL, self)

        # FIXME if config verbose
        #self.registerNotifier(vtrace.NOTIFY_ALL, vtrace.VerboseNotifier())

        self.vdbhome = e_config.gethomedir(".vdb")

        self.loadConfig()

        self.setupSignalLookups()

        # Ok... from here down we're handing everybody the crazy
        # on-demand-resolved trace object.
        trace = vdb.VdbTrace(self)
        e_cli.EnviMutableCli.__init__(self, trace, self.config, symobj=trace)

        self.prompt = "vdb > "
        self.banner = "Welcome To VDB!\n"

        self.loadDefaultRenderers(trace)
        self.loadExtensions(trace)
开发者ID:gdisneyleugers,项目名称:vdebug,代码行数:35,代码来源:__init__.py

示例6: load_binary

def load_binary(filepath, base=None):
    opList = {}
    trace = vtrace.getTrace()

    trace.execute(filepath)
#######################################################################
# Enable the notifier.  Used later to catch the page execute exception.
    notif = CustomNotifier()
    eve = vtrace.NOTIFY_ALL
    trace.registerNotifier(eve, notif)
#######################################################################
# Set a breakpoint on CreateProcessA and run until it is hit
    pattern = "CreateProcessA()"
    v_api.setBpOnPattern(trace, pattern)
    v_api.printBp(trace)
    trace.run()

#######################################################################
# Functions sets child process to start suspended and attaches to it
# as soon as it returns to userland by setting the Entry Point page
# as non executable and catching the exception that is thrown.
    print "followCreateProcessA"
    v_api.followCreateProcessA(trace)
    
    addr = v_api.getOEP(trace, "pwnables100")
    v_api.nxMemPerm(trace, addr)
#####################################################################
# Beyond this point the debugger is attached to the child process
# 
    print ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
    print "HOLY BREAKPOINT BATMAN!"
    print "EIP: ", v_api.printableEIP(trace)
开发者ID:hoangcuongflp,项目名称:vtrace_scripts,代码行数:32,代码来源:simpleFollowChild.py

示例7: load_binary

def load_binary(filepath, base=None):
    # Get the current vtrace object
    trace = vtrace.getTrace()

    # If attempting to attach to a 64 bit process
    # 64 bit python is required.
    trace.execute(filepath)

    # Start the program executing
    trace.run()
开发者ID:hoangcuongflp,项目名称:vtrace_scripts,代码行数:10,代码来源:simpleRun.py

示例8: main

def main():
    if len(sys.argv) < 3:
        print("dreifuzz -- a effortlessly uncomplicated fuzzer\n"
                "usage: ./dreifuzz.py [executable] [file]")
        return

    exepath = sys.argv[1]
    filepath = sys.argv[2]

    trace = vtrace.getTrace()

    load_binary(trace, exepath, filepath)
开发者ID:dtouch3d,项目名称:dreifuzz,代码行数:12,代码来源:dreifuzz.py

示例9: __init__

    def __init__(self, trace=None, parent=None):
        vq_tree.VQTreeView.__init__(self, parent=parent)
        if trace == None:
            trace = vtrace.getTrace()
        self.trace = trace

        model = VQProcessListModel(parent=self)
        self.setModel(model)
        self.setAlternatingRowColors(True)

        for pid,name in self.trace.ps():
            model.append((pid,name))
开发者ID:Fitblip,项目名称:SocketSniff,代码行数:12,代码来源:qt.py

示例10: load_binary

def load_binary(filePID, base=None):
    
    # Ask for the current trace object so we can play with it
    trace = vtrace.getTrace()

    # If attempting to attach to a 64 bit process
    # 64 bit python is required.
    if pid != None:
        trace.attach(filePID)

    # Start executing the program.  
    # Will not stop until it finishes or is killed    
    trace.run()
开发者ID:hoangcuongflp,项目名称:vtrace_scripts,代码行数:13,代码来源:simpleAttach.py

示例11: main

def main():
    import vtrace
    sym = sys.argv[1]
    pid = int(sys.argv[2])
    t = vtrace.getTrace()
    t.attach(pid)
    symaddr = t.parseExpression(sym)
    t.addBreakpoint(vtrace.Breakpoint(symaddr))
    while t.getProgramCounter() != symaddr:
        t.run()
    snap = t.takeSnapshot()
    #snap.saveToFile("woot.snap") # You may open in vdb to follow along
    emu = emulatorFromTraceSnapshot(snap)
    lockStepEmulator(emu, t)
开发者ID:albertz,项目名称:pydbattach,代码行数:14,代码来源:envitools.py

示例12: main

def main(binary, breakpoint, arg_number):
   trace = vtrace.getTrace()
   try:
      trace.execute(binary)
   except:
      print "[EE] No such file"
   try:
      trace.addBreakByAddr(breakpoint)
   except:
      print "[EE] Invalide addr %s" %(hex(breakpoint))
      return 
   trace.run()
   print_stack(trace, arg_number)
   return (0)
开发者ID:Debug-Orz,项目名称:stuffz,代码行数:14,代码来源:vtrace-show_args_function.py

示例13: main

def main(binary, breakpoint, memory, size):
   trace = vtrace.getTrace()
   try:
      trace.execute(binary)
   except:
      print "[EE] No such file"
   try:
      trace.addBreakByAddr(breakpoint)
   except:
      print "[EE] Invalide addr %s" %(hex(breakpoint))
      return 
   trace.run()
   dump_memory(trace, memory, size)
   return (0)
开发者ID:Debug-Orz,项目名称:stuffz,代码行数:14,代码来源:vtrace-dump_memory.py

示例14: newTrace

    def newTrace(self):
        """
        Generate a new trace for this vdb instance.  This fixes many of
        the new attach/exec data munging issues because tracer re-use is
        *very* sketchy...
        """
        oldtrace = self.getTrace()
        if oldtrace.isRunning():
            oldtrace.sendBreak()
        if oldtrace.isAttached():
            oldtrace.detach()

        self.trace = vtrace.getTrace()
        self.manageTrace(self.trace)
        return self.trace
开发者ID:gdisneyleugers,项目名称:vdebug,代码行数:15,代码来源:__init__.py

示例15: main

def main(argv):
    global trace

    trace = vtrace.getTrace()
    if len(argv) != 2:
        print "Usage: %s <KeePass.exe>" % sys.argv[0]
        sys.exit(1)

    pid = find_pid_by_name(sys.argv[1])
    if pid:
        print "Found PID: %i" % pid
    else:
        print "Program not running"
        trace.release()
        sys.exit(1)
    attach(pid)
开发者ID:jkadijk,项目名称:reversing-scripts,代码行数:16,代码来源:hookpass.py


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