再看《Python灰帽子》,其中有一个例子是在已有的进程上挂接调试器,具体的代码如下:
def attach(self, pid):
self.h_process = self.open_process(pid)
if kernel32.DebugActiveProcess(pid):
self.debugger_active = True
self.pid = int(pid)
self.run()
else:
print "[*] Unable to attach to the process"
但是在这里始终不成功,麻烦各位大哥给小弟指点指点
def attach(self, pid):
self.h_process = self.open_process(pid)
if kernel32.DebugActiveProcess(pid):
self.debugger_active = True
self.pid = int(pid)
self.run()
else:
print "[*] Unable to attach to the process"
但是在这里始终不成功,麻烦各位大哥给小弟指点指点