diff --git a/main.py b/main.py index 44f8a40..f747211 100644 --- a/main.py +++ b/main.py @@ -8,16 +8,27 @@ from win32api import GetAsyncKeyState class Hack(): def __init__(self) -> None: + # Loading offsets + self.offsets = self._find_offsets() + self.cheats_list = [func for func in dir(self) # Function if callable(getattr(self, func)) # User defined if not (func.startswith("__") and func.endswith("__")) # Blacklist - if func not in ["_find_process", "find_module"]] + if func not in ["_find_offsets", + "_find_process", + "find_module"]] self.pm = self._find_process(True) + def _find_offsets(self) -> dict[str, int]: + hazedumper_data = get( + "https://raw.githubusercontent.com/frk1/hazedumper/master/csgo.min.json") + serial_data = loads(hazedumper_data.text) + return serial_data["signatures"] | serial_data["netvars"] + def _find_process(self, verbose: bool = False) -> Pymem: """Find game process""" process_found = False @@ -50,7 +61,9 @@ class Hack(): raise MemoryError def bhop(self) -> None: + # Aliases mem = self.pm + offset = self.offsets # Get module address client = self.find_module("client") @@ -81,15 +94,10 @@ class Hack(): if __name__ == "__main__": - # 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() + # Cheat list print("Enter 0 to exit.") print("Available cheats:") for idx, cheat in enumerate(c.cheats_list):