def find_pid(dbg, name): namel = name.lower() found_target = False for (pid, proc_name) in dbg.enumerate_processes(): if proc_name.lower() == namel: return pid return -1 #and a simple use example: dbg = pydbg() pid = find_pid(dbg, "notepad.exe") if pid!=-1: print ("Attaching to %d") % (pid) dbg.attach(pid) else: error("process not found.")
There are 31,328 total registered users.
[+] expand