Closed iconFehu closed 1 year ago
Main post has been edited so I remove my answer
According to the error message, it can be seen that it is a type error. Specifically, this error is because the WriteProcessMemory function expects the fifth parameter type to be LP_c_ulong, and is now passing an int type. LP_c_ulong is a ctypes type that represents a pointer to an unsigned long integer, and the int type is not such a type. To fix this, code modified like this is required
res = ctypes.windll.kernel32.WriteProcessMemory(handle, dst, data, length, ctypes.c_ulong(0x0))
Describe the bug A clear and concise description of what the bug is.
Your Environment
Expected behavior A clear and concise description of what you expected to happen. An exception is thrown when executing ctypes.windll.kernel32.WriteProcessMemory ctypes.windll.kernel32.WriteProcessMemory(handle, dst, data, length, 0) need ctypes.c_ulong
Traceback
Additional context Add any other context about the problem here.