-
Автор темы
- #1
Код:
import pymem, ctypes, time
def get_window_process(window):
out: int = ctypes.c_int()
ctypes.windll.user32.GetWindowThreadProcessId(window, ctypes.byref(out))
return out.value
pid = get_window_process(ctypes.windll.user32.FindWindowW(0, "Garry's Mod (x64)"))
gmod = pymem.pymem.process.open(pid)
engine = pymem.pymem.process.module_from_name(gmod, "engine.dll")
OFFSET = 0xF4562
value = pymem.pymem.memory.read_bytes(gmod, engine.lpBaseOfDll + OFFSET, 1)
if value == b'\x74':
pymem.pymem.memory.write_char(gmod, engine.lpBaseOfDll + OFFSET, b'\x75')
elif value == b'\x75':
pymem.pymem.memory.write_char(gmod, engine.lpBaseOfDll + OFFSET, b'\x74')