├── README.md ├── config.json ├── main.py └── module ├── entity.py ├── offsets.py ├── triggerbot.py └── wallhack.py /README.md: -------------------------------------------------------------------------------- 1 | # Counter Strike 2 Cheat 2 | 3 | This is a simple cheat developed in Python for Counter Strike 2, utilizing libraries like [PyMeow](https://github.com/qb-0/pyMeow) and [Pymem](https://github.com/srounet/Pymem). 4 | 5 | ## Features 6 | 7 | - **Wall Hack (Box):** Enables you to see enemies through walls with a bounding box outline. 8 | - **Trigger Bot:** Automatically fires when the enemy is in the crosshairs. 9 | 10 | ## Demonstration 11 | 12 | ![img](https://telegra.ph/file/77fe10f38478e8218093c.png) 13 | 14 | Here is a screenshot demonstrating the Counter Strike 2 cheat in action. 15 | 16 | ## Usage 17 | 18 | To use this cheat, install it and all dependencies, run the `main.py` script to run. 19 | 20 | 21 | ## Warning 22 | 23 | Using cheats in online games like Counter Strike 2 can result in bans or penalties from the game's developers. I am not responsible for any prohibitions, use at your own risk. 24 | 25 | 26 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ignoreTeam": false, 3 | "wallhack": true, 4 | "wallhackHealth": true, 5 | "triggerbot": true 6 | } 7 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import pyMeow as pm 2 | import threading 3 | from random import choice 4 | from json import load 5 | from module.wallhack import WallHack 6 | from module.triggerbot import TriggerBot 7 | 8 | class Program: 9 | def __init__(self): 10 | try: 11 | self.window = "".join(choice("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") for _ in range(8)) 12 | self.fps = 144 13 | self.config = self.LoadConfig() 14 | self.process = pm.open_process("cs2.exe") 15 | self.module = pm.get_module(self.process, "client.dll")["base"] 16 | self.trigger = TriggerBot(self.process, self.module, ignoreTeam=self.config["ignoreTeam"]) 17 | self.triggerThread = None 18 | self.wall = WallHack(self.process, self.module, wallhackHealth=self.config["wallhackHealth"]) 19 | except: 20 | exit("Error: Enable only after opening Counter Strike 2") 21 | 22 | def LoadConfig(self): 23 | try: 24 | with open("config.json", "r", encoding="utf-8") as file: 25 | return load(file) 26 | except: 27 | exit("Error when importing configuration, see if the config.json file exists") 28 | 29 | def TriggerThread(self): 30 | while pm.overlay_loop(): 31 | if self.config["triggerbot"]: 32 | try: 33 | self.trigger.Enable() 34 | except: 35 | continue 36 | 37 | def Run(self): 38 | pm.overlay_init(target=self.window, title=self.window, fps=self.fps) 39 | 40 | self.triggerThread = threading.Thread(target=self.TriggerThread) 41 | self.triggerThread.start() 42 | 43 | while pm.overlay_loop(): 44 | if self.config["wallhack"]: 45 | try: 46 | self.wall.Render() 47 | except: 48 | continue 49 | 50 | if self.triggerThread: 51 | self.triggerThread.join() 52 | 53 | if __name__ == "__main__": 54 | program = Program() 55 | program.Run() 56 | -------------------------------------------------------------------------------- /module/entity.py: -------------------------------------------------------------------------------- 1 | import pyMeow as pm 2 | from module.offsets import Offsets 3 | 4 | class Entity: 5 | def __init__(self, pointer, pawnPointer, process): 6 | self.pointer = pointer 7 | self.pawnPointer = pawnPointer 8 | self.process = process 9 | self.pos2d = None 10 | self.headPos2d = None 11 | 12 | def Health(self): 13 | return pm.r_int(self.process, self.pawnPointer + Offsets.m_iHealth) 14 | 15 | def Team(self): 16 | return pm.r_int(self.process, self.pawnPointer + Offsets.m_iTeamNum) 17 | 18 | def Pos(self): 19 | return pm.r_vec3(self.process, self.pawnPointer + Offsets.m_vOldOrigin) 20 | 21 | def BonePos(self, bone): 22 | gameScene = pm.r_int64(self.process, self.pawnPointer + Offsets.m_pGameSceneNode) 23 | boneArrayPointer = pm.r_int64(self.process, gameScene + 496) # NOTE: 496 is the current offset for 'm_pBoneArray'. ( THIS WILL BREAK IN FEATURE ) 24 | return pm.r_vec3(self.process, boneArrayPointer + bone * 32) 25 | 26 | def Wts(self, matrix): 27 | try: 28 | self.pos2d = pm.world_to_screen(matrix, self.Pos(), 1) 29 | self.headPos2d = pm.world_to_screen(matrix, self.BonePos(6), 1) 30 | except: 31 | return False 32 | 33 | return True 34 | -------------------------------------------------------------------------------- /module/offsets.py: -------------------------------------------------------------------------------- 1 | # Offsets dumped by: https://github.com/a2x/cs2-dumper 2 | 3 | from requests import get 4 | 5 | class Offsets: 6 | try: 7 | offset = get("https://raw.githubusercontent.com/a2x/cs2-dumper/main/output/offsets.json").json() 8 | client = get("https://raw.githubusercontent.com/a2x/cs2-dumper/main/output/client.dll.json").json() 9 | 10 | dwEntityList = offset["client.dll"]["dwEntityList"] 11 | dwViewMatrix = offset["client.dll"]["dwViewMatrix"] 12 | dwLocalPlayerPawn = offset["client.dll"]["dwLocalPlayerPawn"] 13 | dwLocalPlayerController = offset["client.dll"]["dwLocalPlayerController"] 14 | m_iszPlayerName = client["client.dll"]["classes"]["CBasePlayerController"]["fields"]["m_iszPlayerName"] 15 | m_iHealth = client["client.dll"]["classes"]["C_BaseEntity"]["fields"]["m_iHealth"] 16 | m_iTeamNum = client["client.dll"]["classes"]["C_BaseEntity"]["fields"]["m_iTeamNum"] 17 | m_vOldOrigin = client["client.dll"]["classes"]["C_BasePlayerPawn"]["fields"]["m_vOldOrigin"] 18 | m_pGameSceneNode = client["client.dll"]["classes"]["C_BaseEntity"]["fields"]["m_pGameSceneNode"] 19 | m_hPlayerPawn = client["client.dll"]["classes"]["CCSPlayerController"]["fields"]["m_hPlayerPawn"] 20 | m_iIDEntIndex = client["client.dll"]["classes"]["C_CSPlayerPawnBase"]["fields"]["m_iIDEntIndex"] 21 | except: 22 | exit("Error: Invalid offsets, wait for an update") 23 | -------------------------------------------------------------------------------- /module/triggerbot.py: -------------------------------------------------------------------------------- 1 | import pyMeow as pm 2 | from time import sleep 3 | from random import uniform 4 | from module.offsets import Offsets 5 | 6 | class TriggerBot: 7 | def __init__(self, process, module, ignoreTeam=False): 8 | self.ignoreTeam = ignoreTeam 9 | self.process = process 10 | self.module = module 11 | 12 | def Shoot(self): 13 | sleep(uniform(0.01, 0.03)) 14 | pm.mouse_down(button='left') 15 | sleep(uniform(0.01, 0.05)) 16 | pm.mouse_up(button='left') 17 | sleep(0.1) 18 | 19 | def Enable(self): 20 | player = pm.r_uint64(self.process, self.module + Offsets.dwLocalPlayerPawn) 21 | entityId = pm.r_int(self.process, player + Offsets.m_iIDEntIndex) 22 | 23 | if entityId > 0: 24 | entList = pm.r_uint64(self.process, self.module + Offsets.dwEntityList) 25 | entEntry = pm.r_uint64(self.process,entList + 0x8 * (entityId >> 9) + 0x10) 26 | entity = pm.r_uint64(self.process,entEntry + 120 * (entityId & 0x1FF)) 27 | entityTeam = pm.r_int(self.process,entity + Offsets.m_iTeamNum) 28 | playerTeam = pm.r_int(self.process,player + Offsets.m_iTeamNum) 29 | entityHp = pm.r_int(self.process,entity + Offsets.m_iHealth) 30 | 31 | if self.ignoreTeam or (entityTeam != playerTeam) and entityHp > 0: 32 | self.Shoot() 33 | -------------------------------------------------------------------------------- /module/wallhack.py: -------------------------------------------------------------------------------- 1 | import pyMeow as pm 2 | from module.offsets import Offsets 3 | from module.entity import Entity 4 | 5 | class WallHack: 6 | def __init__(self, process, module, wallhackHealth=True): 7 | self.wallhackHealth = wallhackHealth 8 | self.process = process 9 | self.module = module 10 | 11 | def GetEntities(self): 12 | entityList = pm.r_int64(self.process, self.module + Offsets.dwEntityList) 13 | localPlayer = pm.r_int64(self.process, self.module + Offsets.dwLocalPlayerController) 14 | 15 | for _ in range(1, 65): 16 | try: 17 | entryPointer = pm.r_int64(self.process, entityList + (8 * (_ & 0x7FFF) >> 9) + 16) 18 | controllerPointer = pm.r_int64(self.process, entryPointer + 120 * (_ & 0x1FF)) 19 | 20 | if controllerPointer == localPlayer: 21 | continue 22 | 23 | controllerPawnPointer = pm.r_int64(self.process, controllerPointer + Offsets.m_hPlayerPawn) 24 | listEntityPointer = pm.r_int64(self.process, entityList + 0x8 * ((controllerPawnPointer & 0x7FFF) >> 9) + 16) 25 | pawnPointer = pm.r_int64(self.process, listEntityPointer + 120 * (controllerPawnPointer & 0x1FF)) 26 | except: 27 | continue 28 | 29 | yield Entity(controllerPointer, pawnPointer, self.process) 30 | 31 | def Render(self): 32 | matrix = pm.r_floats(self.process, self.module + Offsets.dwViewMatrix, 16) 33 | 34 | for entity in self.GetEntities(): 35 | if entity.Wts(matrix) and entity.Health() > 0: 36 | head = entity.pos2d["y"] - entity.headPos2d["y"] 37 | width = head / 2 38 | center = width / 2 39 | color = pm.get_color("blue") if entity.Team() != 2 else pm.get_color("orange") 40 | fill = pm.fade_color(pm.get_color("#242625"), 0.5) 41 | 42 | # Box Fill 43 | pm.draw_rectangle(entity.headPos2d["x"] - center, entity.headPos2d["y"] - center / 2, width, head + center / 2, fill) 44 | 45 | # Box 46 | pm.draw_rectangle_lines(entity.headPos2d["x"] - center, entity.headPos2d["y"] - center / 2, width, head + center / 2, color, 0.8) 47 | 48 | if self.wallhackHealth: 49 | # Health 50 | pm.draw_rectangle( 51 | entity.headPos2d["x"] - center - 10, 52 | entity.headPos2d["y"] - center / 2 + (head * 0 / 100), 53 | 3, 54 | head + center / 2 - (head * 0 / 100), 55 | color, 56 | ) 57 | 58 | # Health Fill 59 | pm.draw_rectangle( 60 | entity.headPos2d["x"] - center - 10, 61 | entity.headPos2d["y"] - center / 2 + (head * (100 - entity.Health()) / 100), 62 | 3, 63 | head + center / 2 - (head * (100 - entity.Health()) / 100), 64 | pm.get_color("#00FF17"), 65 | ) 66 | 67 | 68 | pm.end_drawing() 69 | --------------------------------------------------------------------------------