Python PyDBG进程还原不';行不通

Python PyDBG进程还原不';行不通,python,windows,pydbg,Python,Windows,Pydbg,我正在Windows7 x64中使用python 2.5(x86)。 我在这本书后面写了代码 但它在我的环境中不起作用 PDBG_ERR> -- IGNORING ERROR -- PDBG_ERR> process_restore: [87] WriteProcessMemory 我想问题来自Windows版本,因为有人在下面的url页面中提到了它,我听说它在Windows XP中工作 如何避免此错误并使其正常工作?当我检查流程如何工作时,其他地址已成功写入。只有地址“00

我正在Windows7 x64中使用python 2.5(x86)。 我在这本书后面写了代码

但它在我的环境中不起作用

PDBG_ERR> -- IGNORING ERROR --
PDBG_ERR> process_restore: [87] WriteProcessMemory
我想问题来自Windows版本,因为有人在下面的url页面中提到了它,我听说它在Windows XP中工作


如何避免此错误并使其正常工作?

当我检查流程如何工作时,其他地址已成功写入。只有地址“000f0000”是错误的。因此,calc.exe的进程地址除了显示calc外基本正常。我不知道为什么,但我认为这不是一个大问题。calc.exe是64位windows 7上的64位进程。grey hat python中的所有内容都只能在32位可执行文件上工作。然而,我正在我的计算机上测试一个32位版本的7z,它仍然遇到同样的问题。顺便说一句,windows 7确实附带了一个32位的windows XP,因此您可以在该版本中成功运行它。
from pydbg import *
from pydbg.defines import *
import threading
import time
import sys

class snapshotter(object):
    def __init__(self,exe_path):
        self.exe_path = exe_path
        self.pid = None
        self.dbg = None
        self.running = True

        pydbg_thread = threading.Thread(target=self.start_debugger)
        pydbg_thread.setDaemon(0)
        pydbg_thread.start()

        while self.pid == None:
            time.sleep(1)

        monitor_thread = threading.Thread(target=self.monitor_debugger)
        monitor_thread.setDaemon(0)
        monitor_thread.start()

    def monitor_debugger(self):
        while self.running == True:
            input = raw_input("Enter: 'snap','restore' or 'quit'")
            input = input.lower().strip()
            if input == "quit":
                print "[*] Exiting the snapshotter."
                self.running = False
                self.dbg.terminate_process()
            elif input == "snap":
                print "[*] Suspending all threads."
                self.dbg.suspend_all_threads()
                print "[*] Obtaining snapshot."
                self.dbg.process_snapshot()
                print "[*] Resuming operation."
                self.dbg.resume_all_threads()
            elif input == "restore":
                print "[*] Suspending all threads."
                self.dbg.suspend_all_threads()
                print "[*] Restoring snapshot."
                self.dbg.process_restore()
                print "[*] Resuming operation."
                self.dbg.resume_all_threads()

    def start_debugger(self):
        self.dbg = pydbg()
        pid = self.dbg.load(self.exe_path)
        self.pid = self.dbg.pid
        self.dbg.run()

exe_path = "C:\\WINDOWS\\System32\\calc.exe"
snapshotter(exe_path)