from pymem import Pymem fileStruct = (0x6d9100) bufferOffset = (3 - 1) * 4 pm = Pymem('Rebels.exe') bufferPtr = pm.read_uint(fileStruct + bufferOffset) content = [] idx = 0 while True: ch = pm.read_uchar(bufferPtr + idx) if ch in [0x0D, 0xF0, 0xAD, 0xBA]: break content.append(ch) idx += 1 print(''.join([chr(x) for x in content]))
from pymem import Pymem from re import search from pymem.process import module_from_name from pymem.exception import ProcessNotFound try: processName='csgo.exe' pm = Pymem(processName) client = module_from_name(pm.process_handle,'client.dll') clientLpBaseOfDll=client.lpBaseOfDll clientModule = pm.read_bytes(clientLpBaseOfDll, client.SizeOfImage) address = clientLpBaseOfDll + search(rb'\x83\xF8.\x8B\x45\x08\x0F', clientModule).start() + 2 pm.write_uchar(address, 2 if pm.read_uchar(address) == 1 else 1) pm.close_process() print("hack completed") except ProcessNotFound: print("error: couldn't find process",processName)