I am trying to write to memory in python. I need to write an Integer but for the WriteProcessMemory function, I need a buffer.
writeProcessMemory = kernel.WriteProcessMemory
writeProcessMemory.argtypes = [ctypes.wintypes.HANDLE,
ctypes.wintypes.LPVOID, ctypes.wintypes.LPCVOID, ctypes.c_size_t,
ctypes.POINTER(ctypes.c_size_t)]
writeProcessMemory.restype = ctypes.wintypes.BOOL
openProcess = kernel.OpenProcess
openProcess.argtypes = [ctypes.wintypes.DWORD, ctypes.wintypes.BOOL,
ctypes.wintypes.DWORD]
openProcess.restype = ctypes.wintypes.HANDLE
handle = openProcess(PROCESS_ALL_ACCESS, False, pid)
addr = 0x024EA498
data = ctypes.c_int(1000)
buffer = #i need to create a buffer here