Michaelc Cheater Reputation: 0
Joined: 15 May 2016 Posts: 47
|
Posted: Sun Oct 15, 2017 1:58 pm Post subject: Is this how you scan for a double values? |
|
|
The way to read double values is to set the buffer in the size of a double, right?
hence this line buffer = ctypes.c_double()
and then inside
if ReadProcessMemory(Process, i, ctypes.byref(buffer), \
ctypes.sizeof(buffer), ctypes.byref(nread)):
This is Python
Code: |
buffer = ctypes.c_double()
nread = SIZE_T()
hit_count = 0
hit_pool_2 = list()
for i in hit_pool:
Kernel32.VirtualQueryEx(Process, \
i, ctypes.byref(mbi),ctypes.sizeof(mbi))
if mbi.Protect == PAGE_READWRITE and mbi.State == MEM_COMMIT :
print('This region can be scanned!')
if ReadProcessMemory(Process, i, ctypes.byref(buffer), \
ctypes.sizeof(buffer), ctypes.byref(nread)):
if buffer.value < (target_value + 1) and \
buffer.value > (target_value - 1):
print(i,'Hit!!!')
hit_pool_2.append(i)
else:
print('else happend.')
input('program pause because ReadProcessMemory happened.')
else:
'2nd run VirtualQueryEx error'
hit_pool = hit_pool_2
print('Hit_pool', hit_pool)
return hit_pool_2
|
|
|