import pymem
import pymem.process
import time
pm = pymem.Pymem("hl.exe")
client = pymem.process.module_from_name(pm.process_handle, "hw.dll")
client_base = client.lpBaseOfDll
print(f"Поиск dwLocalPlayer в диапазоне {hex(client_base)} - {hex(client_base+0x200000)}")
found = False
for offset in range(0, 0x200000, 4):
try:
addr = client_base + offset
health = pm.read_int(addr)
if health == 100:
team = pm.read_int(addr - 0x8)
if team in (1, 2):
print(f"\n[+] Найдено!")
print(f" Абсолютный адрес health: {hex(addr)}")
print(f" dwLocalPlayer = {hex(offset - 0xF8)}")
print(f" m_iHealth offset: 0xF8")
print(f" m_iTeamNum offset: 0xF0")
found = True
# Проверим entity list
entity_list_addr = client_base + (offset - 0xF8 + 0xC0)
print(f" dwEntityList (предположительно): {hex(offset - 0xF8 + 0xC0)}")
break
except:
pass
if not found:
print("[-] Не найдено. Убедитесь, что вы в катке и живы.")
input("\nНажмите Enter для выхода...")