From 5b4fd715dc9df5aee20cd02bbdec079369354a36 Mon Sep 17 00:00:00 2001 From: davidgfb Date: Sat, 24 Oct 2020 10:24:19 +0200 Subject: [PATCH 1/3] Update OneByteWallhack.py --- OneByteWallhack.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OneByteWallhack.py b/OneByteWallhack.py index 46bd332..dfcfd66 100644 --- a/OneByteWallhack.py +++ b/OneByteWallhack.py @@ -1,12 +1,12 @@ -import pymem -import re +from pymem import Pymem,process +from re import search -pm = pymem.Pymem('csgo.exe') -client = pymem.process.module_from_name(pm.process_handle, +pm = Pymem('csgo.exe') +client = process.module_from_name(pm.process_handle, 'client.dll') clientModule = pm.read_bytes(client.lpBaseOfDll, client.SizeOfImage) -address = client.lpBaseOfDll + re.search(rb'\x83\xF8.\x8B\x45\x08\x0F', +address = client.lpBaseOfDll + search(rb'\x83\xF8.\x8B\x45\x08\x0F', clientModule).start() + 2 pm.write_uchar(address, 2 if pm.read_uchar(address) == 1 else 1) From c72c31f4de55e8249f16f1c8d3b590f73b7f8cf5 Mon Sep 17 00:00:00 2001 From: davidgfb Date: Sat, 24 Oct 2020 10:27:52 +0200 Subject: [PATCH 2/3] Update README.md --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7f43c2e..cec4ea2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # OneByteWallhack -CS:GO wallhack achieved by patching one byte of game memory. Written in Python 3. +CS:GO wallhack achieved by patching one byte of game process memory. Written in Python 3.9 This does the same as **r_drawothermodels 2** command but without touching the cvar, so it's VAC - safe. @@ -13,4 +13,11 @@ if ( r_drawothermodels.GetInt() == 2 ) } ``` -The **r_drawothermodels** check is modified to make the `if` expression evaluate to **true** when **r_drawothermodels** cvar is set to default value (1). \ No newline at end of file +The **r_drawothermodels** check is modified to make the `if` expression evaluate to **true** when **r_drawothermodels** cvar is set to default value (1). + +𝗜𝗺𝗽𝗼𝗿𝘁𝗮𝗻𝘁! : +Download python 3.9 or newer if you hadn't: https://www.python.org/downloads/ +You may need to head to "C:\Users\ username \AppData\Local\Programs\Python\Python39\Scripts" press Win+R write "cmd" and "pip install pymem" and or "pip install pywin32" and restart your pc. + +Usage: +Run CSGO before this script. You will also need to run this script as administrator From eecc15db9edd48ac5f5c86928122aadca177e9b0 Mon Sep 17 00:00:00 2001 From: davidgfb Date: Sat, 28 Nov 2020 23:50:23 +0100 Subject: [PATCH 3/3] add try except when process is not launched --- OneByteWallhack.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/OneByteWallhack.py b/OneByteWallhack.py index dfcfd66..b7203bb 100644 --- a/OneByteWallhack.py +++ b/OneByteWallhack.py @@ -1,13 +1,19 @@ from pymem import Pymem,process from re import search -pm = Pymem('csgo.exe') -client = process.module_from_name(pm.process_handle, - 'client.dll') +try: + processName='csgo.exe' + pm = Pymem(processName) + client = process.module_from_name(pm.process_handle,'client.dll') -clientModule = pm.read_bytes(client.lpBaseOfDll, client.SizeOfImage) -address = client.lpBaseOfDll + search(rb'\x83\xF8.\x8B\x45\x08\x0F', - clientModule).start() + 2 + clientModule = pm.read_bytes(client.lpBaseOfDll, client.SizeOfImage) + address = client.lpBaseOfDll + search(rb'\x83\xF8.\x8B\x45\x08\x0F', + clientModule).start() + 2 -pm.write_uchar(address, 2 if pm.read_uchar(address) == 1 else 1) -pm.close_process() + pm.write_uchar(address, 2 if pm.read_uchar(address) == 1 else 1) + pm.close_process() + + print("hack completed") + +except: + print("error: couldn't find process",processName)