def platformExec(self, cmdline): self.execing = True cmdlist = v_util.splitargs(cmdline) os.stat(cmdlist[0]) pid = os.fork() if pid == 0: ptrace(PT_TRACE_ME, 0, 0, 0) os.execv(cmdlist[0], cmdlist) sys.exit(-1) return pid
def platformExec(self, cmdline): # Basically just like the one in the Ptrace mixin... self.execing = True cmdlist = v_util.splitargs(cmdline) os.stat(cmdlist[0]) pid = os.fork() if pid == 0: v_posix.ptrace(PT_TRACE_ME, 0, 0, 0) os.execv(cmdlist[0], cmdlist) sys.exit(-1) return pid
def heaps(vdb, line): """ Show Win32 Heap Information. Usage: heaps [-F <heapaddr>] [-C <address>] [-L <segmentaddr>] -F <heapaddr> print the freelist for the heap -C <address> Find and print the heap chunk containing <address> -L <segmentaddr> Print the chunks for the given heap segment (no options lists heaps and segments) """ t = vdb.getTrace() t.requireAttached() argv = v_util.splitargs(line) freelist_heap = None chunkfind_addr = None chunklist_seg = None try: opts, args = getopt.getopt(argv, "F:C:L:") except Exception, e: vdb.vprint("Unrecognized Options in: %s" % line)