Python中有没有好的、易于使用的内存编辑模块?
Python中有没有好的、易于使用的内存编辑模块?或者有这样的模块吗Python中有没有好的、易于使用的内存编辑模块?,python,python-3.2,memory-editing,Python,Python 3.2,Memory Editing,Python中有没有好的、易于使用的内存编辑模块?或者有这样的模块吗 我要寻找的是一种附加到进程并对其进行读写的方法。很像作弊引擎的工作原理 我花了一段时间才找到这样做的方法,但以下是我的想法 from ctypes import * from ctypes.wintypes import * pid = 0 #the pid of the process, aquired earlier by hand address = 0x0000 #where to read from while
我要寻找的是一种附加到进程并对其进行读写的方法。很像作弊引擎的工作原理 我花了一段时间才找到这样做的方法,但以下是我的想法
from ctypes import *
from ctypes.wintypes import *
pid = 0 #the pid of the process, aquired earlier by hand
address = 0x0000 #where to read from while in the memory
OpenProcess = windll.kernel32.OpenProcess
ReadProcessMemory = windll.kernel32.ReadProcessMemory
CloseHandle = windll.kernel32.CloseHandle
PROCESS_ALL_ACCESS = 0x1F0FFF
datadummy = b'.'*200
buffer = c_char_p(datadummy)
bufferSize = len(buffer.value)
bytesRead = c_ulong(0)
processHandle = OpenProcess(PROCESS_ALL_ACCESS, False, int(PID))
ReadProcessMemory(processHandle, address, buffer, bufferSize, byref(bytesRead))
CloseHandle(processHandle)
要写入内存,我只需添加
WriteProcessMemory=windell.kernel32.WriteProcessMemory
,然后称之为内存编辑是什么意思?谁的记忆,什么样的记忆,以何种方式?你需要让你的问题更清楚。这个问题根本没有任何意义,而且显然写得不好。请将您的问题编辑成可读的问题。您可能可以使用该模块进行编辑。具体来说,使用ctypes.from_address()
函数。当我运行print(readprocessmemory(…)时,它会打印0,我想我应该更改datadummy=b'.*200 buffer=c_char\u p(datadummy)bufferSize=len(buffer.value)bytesRead=c_ulong(0)但我不知道..@extreme4all ReadProcessMemory写入缓冲区“buffer”的内容,返回的值是错误代码(0=无错误)。