From bdbecc758cf901d4f705da866502f2bc4c134d14 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 30 Mar 2023 14:55:45 +0200 Subject: [PATCH] add glow (wallhack) --- main.py | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 959b162..c228413 100644 --- a/main.py +++ b/main.py @@ -22,7 +22,12 @@ class Hack(): serial_data = loads(hazedumper_data.text) return serial_data["signatures"] | serial_data["netvars"] | { - "entity_size": 0x10 + "entity_size": 0x10, + "glow_obj_size": 0x38, + "glow_R": 0x8, + "glow_G": 0xC, + "glow_B": 0x10, + "glow_A": 0x14 } def _find_process(self, verbose: bool = False) -> Pymem: @@ -134,11 +139,12 @@ class Cheat(Hack): local_team = self.find_uint(local_player, offset["m_iTeamNum"]) def cheat(): - # Show ennemies + # Loop all entities for i in range(1, 64): # 0 is world entity = mem.read_uint( client + offset["dwEntityList"] + i * offset["entity_size"]) + # Ignore if entity doesn't exist if not entity: continue @@ -154,6 +160,56 @@ class Cheat(Hack): self.hack_loop(cheat) + def glow(self) -> None: + # Aliases + mem = self.pm + offset = self.offsets + + # Get module address + client = self.find_module("client") + + # Get local player + local_player = self.find_uint(client, offset["dwLocalPlayer"]) + + # Get local team + local_team = self.find_uint(local_player, offset["m_iTeamNum"]) + + # Get glow object manager + glow_obj_manager = self.find_uint( + client, offset["dwGlowObjectManager"]) + + def cheat(): + # Loop all entities + for i in range(1, 64): # 0 is world + entity = mem.read_uint( + client + offset["dwEntityList"] + i * offset["entity_size"]) + + # Ignore if entity doesn't exist + if not entity: + continue + + # Ignore allies + if mem.read_uint(entity + offset["m_iTeamNum"]) == local_team: + continue + + # Space between values + i = mem.read_int( + entity + offset["m_iGlowIndex"]) * offset["glow_obj_size"] + + # Change color glow + mem.write_float(glow_obj_manager + i + offset["glow_R"], 1.) + mem.write_float(glow_obj_manager + i + offset["glow_G"], 0.) + mem.write_float(glow_obj_manager + i + offset["glow_B"], 0.) + mem.write_float(glow_obj_manager + i + offset["glow_A"], 1.) + + # Render when not visible + mem.write_bool(glow_obj_manager + i + 0x27, True) + + # Render when visible + mem.write_bool(glow_obj_manager + i + 0x28, True) + + self.hack_loop(cheat) + if __name__ == "__main__": # Cheat