download latest offset, use class, fix bhop

This commit is contained in:
Mylloon 2023-03-30 12:25:09 +02:00
parent 813dc6e87d
commit 5a052f6b31
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 69 additions and 30 deletions

98
main.py
View file

@ -1,47 +1,85 @@
from json import loads
from time import sleep from time import sleep
from pymem import Pymem from pymem import Pymem
from requests import get
from win32api import GetAsyncKeyState from win32api import GetAsyncKeyState
# offsets
LOCAL_PLAYER = 14596452
FORCE_JUMP = 86756784
HEALTH = 256
FLAGS = 260
class Hack():
def __init__(self) -> None:
self.running = False
def bhop() -> None: def find_process(self, verbose: bool = False) -> Pymem:
pm = Pymem("csgo.exe") """Find game process"""
process_found = False
print("Looking for process...") if verbose else None
# Get module address pm = None
for module in list(pm.list_modules()): while not process_found:
if module.name == "client.dll": try:
client = module.lpBaseOfDll pm = Pymem("csgo.exe")
except:
# Timeout
sleep(.5)
else:
print("Process found!") if verbose else None
process_found = True
# Hack loop if pm:
while True: return pm
# Reduce CPU usage exit(1)
sleep(0.01)
# Space bar detection def bhop(self) -> None:
if not GetAsyncKeyState(ord(" ")): # Offsets
continue LOCAL_PLAYER = offset["dwLocalPlayer"]
HEALTH = offset["m_iHealth"]
FLAGS = offset["m_fFlags"]
FORCE_JUMP = offset["dwForceJump"]
# Get local player pm = self.find_process(True)
local_player: int = pm.read_uint(client + LOCAL_PLAYER)
if not local_player:
continue
# Check if player is alive # Get module address
if not pm.read_int(local_player + HEALTH): client = None
continue for module in list(pm.list_modules()):
if module.name == "client.dll":
client = module.lpBaseOfDll
# Check if player on ground # Hack loop
if pm.read_uint(local_player+FLAGS) & 1 << 0: self.running = True
pm.write_uint(client + FORCE_JUMP, 6) while self.running:
# Reduce CPU usage
sleep(0.01) sleep(0.01)
pm.write_uint(client + FORCE_JUMP, 4)
# Space bar detection
if not GetAsyncKeyState(ord(" ")):
continue
# Get local player
local_player = pm.read_uint(client + LOCAL_PLAYER)
if not local_player:
continue
# Check if player is alive
if not pm.read_int(local_player + HEALTH):
continue
# Check if player on ground
if pm.read_uint(local_player+FLAGS) & (1 << 0):
pm.write_uint(client + FORCE_JUMP, 5)
sleep(0.01)
pm.write_uint(client + FORCE_JUMP, 4)
if __name__ == "__main__": if __name__ == "__main__":
bhop() # Loading offsets
hazedumper_data = get(
"https://raw.githubusercontent.com/frk1/hazedumper/master/csgo.min.json")
serial_data = loads(hazedumper_data.text)
offset = serial_data["signatures"] | serial_data["netvars"]
# Cheat
c = Hack()
# Bhop
c.bhop()

View file

@ -1,2 +1,3 @@
Pymem==1.10.0 Pymem==1.10.0
pywin32==306 pywin32==306
requests==2.28.2