- Автор темы
- #1
Сам Код
import pymem
import pymem.process
import keyboard
import time
import re
def get_sig(modname, pattern, extra = 0, offset = 0, relative = True):
pm = pymem.Pymem("csgo.exe")
module = pymem.process.module_from_name(pm.process_handle, modname)
bytes = pm.read_bytes(module.lpBaseOfDll, module.SizeOfImage)
match = re.search(pattern, bytes).start()
non_relative = pm.read_int(module.lpBaseOfDll + match + offset) + extra
yes_relative = pm.read_int(module.lpBaseOfDll + match + offset) + extra - module.lpBaseOfDll
return "0x{:X}".format(yes_relative) if relative else "0x{:X}",format(non_relative)
m_iObserverMode = (0x3378)
GetdwLocalPlayer = get_sig('client.dll',rb'\x8D\x34\x85....\x89\x15....\x8B\x41\x08\x8B\x48\x04\x83\xF9\xFF', 4, 3)
dwLocalPlayer = int(GetdwLocalPlayer, 0)
print("dwLocalPlayer Offset:", GetdwLocalPlayer, "Integer Value:", dwLocalPlayer)
switch = 0
pm = pymem.Pymem("csgo.exe")
client = pymem.process.module_from_name(pm.process_handle, "client.dll").lpBaseOfDll
while True:
localplayer = pm.read_int(client + dwLocalPlayer)
if keyboard.is_pressed("z") and switch == 0:
pm.write_int(localplayer + m_iObserverMode, 1)
switch = 1
time.sleep(0.5)
elif keyboard.is_pressed("z") and switch == 1:
pm.write_int(localplayer + m_iObserverMode, 0)
switch = 0
time.sleep(0.5)
import pymem
import pymem.process
import keyboard
import time
import re
def get_sig(modname, pattern, extra = 0, offset = 0, relative = True):
pm = pymem.Pymem("csgo.exe")
module = pymem.process.module_from_name(pm.process_handle, modname)
bytes = pm.read_bytes(module.lpBaseOfDll, module.SizeOfImage)
match = re.search(pattern, bytes).start()
non_relative = pm.read_int(module.lpBaseOfDll + match + offset) + extra
yes_relative = pm.read_int(module.lpBaseOfDll + match + offset) + extra - module.lpBaseOfDll
return "0x{:X}".format(yes_relative) if relative else "0x{:X}",format(non_relative)
m_iObserverMode = (0x3378)
GetdwLocalPlayer = get_sig('client.dll',rb'\x8D\x34\x85....\x89\x15....\x8B\x41\x08\x8B\x48\x04\x83\xF9\xFF', 4, 3)
dwLocalPlayer = int(GetdwLocalPlayer, 0)
print("dwLocalPlayer Offset:", GetdwLocalPlayer, "Integer Value:", dwLocalPlayer)
switch = 0
pm = pymem.Pymem("csgo.exe")
client = pymem.process.module_from_name(pm.process_handle, "client.dll").lpBaseOfDll
while True:
localplayer = pm.read_int(client + dwLocalPlayer)
if keyboard.is_pressed("z") and switch == 0:
pm.write_int(localplayer + m_iObserverMode, 1)
switch = 1
time.sleep(0.5)
elif keyboard.is_pressed("z") and switch == 1:
pm.write_int(localplayer + m_iObserverMode, 0)
switch = 0
time.sleep(0.5)