<class 'OverflowError'>: int too long to convert

Question:

Im trying to read memory of a program but I get error it says

from ReadWriteMemory import ReadWriteMemory

rwm = ReadWriteMemory()

process = rwm.get_process_by_name("Tutorial-x86_64.exe")
process.open()

baseaddress = 0x100000000+0x00325A70

pointer = process.get_pointer(baseaddress, offsets = [0x598, 0x28, 0x8, 0xF8, 0x18, 0x18, 0x7F8])
print(process.read(pointer))
Traceback (most recent call last):
  File "C:UsersuserDesktopprogramfrom ReadWriteMemory import ReadWriteMem.py", line 10, in <module>
    pointer = process.get_pointer(baseaddress, offsets = [0x598, 0x28, 0x8, 0xF8, 0x18, 0x18, 0x7F8])
  File "C:UsersuserAppDataLocalProgramsPythonPython310libsite-packagesReadWriteMemory__init__.py", line 77, in get_pointer
    temp_address = self.read(lp_base_address)
  File "C:UsersuserAppDataLocalProgramsPythonPython310libsite-packagesReadWriteMemory__init__.py", line 100, in read
    ctypes.windll.kernel32.ReadProcessMemory(self.handle, lp_base_address, lp_buffer,
ctypes.ArgumentError: argument 2: <class 'OverflowError'>: int too long to convert
Asked By: cool

||

Answers:

Your version of ReadWriteMemory is too old. This was fixed in September of 2020. You might try pip install --upgrade ReadWriteMemory. If that doesn’t bring in the latest, then you’ll need to edit the package, to apply the two changes to __init__.py shown in this patch to add ctypes.c_void_p(...).

https://github.com/vsantiago113/ReadWriteMemory/commit/e8b2859349e41380b561f6115ee43f058323877a

Answered By: Tim Roberts
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.