Created
July 11, 2021 02:25
-
-
Save opastorello/e1f08a8a2b4f3570804eeb2b7a9673af to your computer and use it in GitHub Desktop.
BOT CSGO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import pymem | |
import pymem.process | |
import keyboard | |
import time | |
import os | |
import win32api | |
import json | |
import urllib.request | |
from datetime import datetime | |
from threading import Thread | |
from win32gui import GetWindowText, GetForegroundWindow | |
from clint.textui import colored | |
PROCESS_TITLE = 'Counter-Strike: Global Offensive' | |
URL_OFFSETS = 'https://raw.githubusercontent.com/frk1/hazedumper/master/csgo.json' | |
def clear(): | |
os.system('cls') | |
def load_offsets(): | |
return json.loads(urllib.request.urlopen(URL_OFFSETS).read().decode()) | |
def glow(): | |
while True: | |
try: | |
if csgo.read_int(client + offsets['signatures']['dwEntityList']) > 0: | |
glow_manager = csgo.read_int(client + offsets['signatures']['dwGlowObjectManager']) | |
for i in range(1, 32): | |
entity = csgo.read_int(client + offsets['signatures']['dwEntityList'] + i * 0x10) | |
if entity: | |
entity_team_id = csgo.read_int(entity + offsets['netvars']['m_iTeamNum']) | |
entity_glow = csgo.read_int(entity + offsets['netvars']['m_iGlowIndex']) | |
if entity_team_id == 2: | |
csgo.write_float(glow_manager + entity_glow * 0x38 + 0x4, float(1)) | |
csgo.write_float(glow_manager + entity_glow * 0x38 + 0x8, float(0)) | |
csgo.write_float(glow_manager + entity_glow * 0x38 + 0xC, float(0)) | |
csgo.write_float(glow_manager + entity_glow * 0x38 + 0x10, float(1)) | |
csgo.write_int(glow_manager + entity_glow * 0x38 + 0x24, 1) | |
elif entity_team_id == 3: | |
csgo.write_float(glow_manager + entity_glow * 0x38 + 0x4, float(0)) | |
csgo.write_float(glow_manager + entity_glow * 0x38 + 0x8, float(0)) | |
csgo.write_float(glow_manager + entity_glow * 0x38 + 0xC, float(1)) | |
csgo.write_float(glow_manager + entity_glow * 0x38 + 0x10, float(1)) | |
csgo.write_int(glow_manager + entity_glow * 0x38 + 0x24, 1) | |
except pymem.exception.MemoryReadError: | |
pass | |
except pymem.exception.MemoryWriteError: | |
pass | |
def bhop(): | |
while True: | |
try: | |
player = csgo.read_int(client + offsets['signatures']['dwLocalPlayer']) | |
force_jump = client + offsets['signatures']['dwForceJump'] | |
on_ground = csgo.read_int(player + offsets['netvars']['m_fFlags']) | |
if keyboard.is_pressed("space") and (GetWindowText(GetForegroundWindow()) == PROCESS_TITLE): | |
if on_ground == 257: | |
csgo.write_int(force_jump, 5) | |
time.sleep(0.17) | |
csgo.write_int(force_jump, 4) | |
time.sleep(0.002) | |
if keyboard.is_pressed("space") and (GetWindowText(GetForegroundWindow()) == PROCESS_TITLE): | |
if on_ground == 263: | |
csgo.write_int(force_jump, 5) | |
time.sleep(0.17) | |
csgo.write_int(force_jump, 4) | |
time.sleep(0.002) | |
except pymem.exception.MemoryReadError: | |
pass | |
except pymem.exception.MemoryWriteError: | |
pass | |
def trigger(): | |
while True: | |
try: | |
player = csgo.read_int(client + offsets['signatures']['dwLocalPlayer']) | |
if keyboard.is_pressed("v") and (GetWindowText(GetForegroundWindow()) == PROCESS_TITLE): | |
entity = csgo.read_int(player + offsets['netvars']['m_iCrosshairId']) | |
if entity > 0 and entity <= 64: | |
entity = csgo.read_int(client + offsets['signatures']['dwEntityList'] + (entity -1) * 0x10) | |
entity_team = csgo.read_int(entity + offsets['netvars']['m_iTeamNum']) | |
player_team = csgo.read_int(player + offsets['netvars']['m_iTeamNum']) | |
if player_team != entity_team: | |
time.sleep(0) | |
csgo.write_int(client + offsets['signatures']['dwForceAttack'], 5) | |
time.sleep(0) | |
csgo.write_int(client + offsets['signatures']['dwForceAttack'], 4) | |
except pymem.exception.MemoryReadError: | |
pass | |
except pymem.exception.MemoryWriteError: | |
pass | |
def no_flash(): | |
while True: | |
try: | |
player = csgo.read_int(client + offsets['signatures']['dwLocalPlayer']) | |
csgo.write_float(player + offsets['netvars']['m_flFlashMaxAlpha'], float(0)) | |
time.sleep(0.02) | |
except pymem.exception.MemoryReadError: | |
pass | |
except pymem.exception.MemoryWriteError: | |
pass | |
try: | |
clear() | |
offsets = load_offsets() | |
csgo = pymem.Pymem("csgo.exe") | |
client = pymem.process.module_from_name(csgo.process_handle, "client_panorama.dll").lpBaseOfDll | |
print(colored.green("Cheat foi executado com sucesso.")) | |
print(colored.yellow("Offsets atualizadas pela última vez em: {}\n".format(datetime.utcfromtimestamp(int(offsets['timestamp'])).strftime('%d/%m/%Y as %H:%M:%S')))) | |
except pymem.exception.CouldNotOpenProcess: | |
clear() | |
print(colored.red("Não foi possível executar o cheat.\n")) | |
time.sleep(3) | |
quit() | |
except pymem.exception.ProcessNotFound: | |
clear() | |
print(colored.red("Não foi possível encontrar o processo do csgo.exe\n")) | |
time.sleep(3) | |
quit() | |
if __name__ == '__main__': | |
try: | |
GlowThread = Thread(target=glow, args=()) | |
BhopThread = Thread(target=bhop, args=()) | |
TriggerThread = Thread(target=trigger, args=()) | |
noFlashThread = Thread(target=no_flash, args=()) | |
GlowThread.start() | |
BhopThread.start() | |
TriggerThread.start() | |
noFlashThread.start() | |
GlowThread.run() | |
BhopThread.run() | |
TriggerThread.run() | |
noFlashThread.run() | |
except KeyboardInterrupt: | |
clear() | |
print(colored.green("Cheat foi encerado.\n")) | |
time.sleep(3) | |
quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment