Solved CSGO Bunnyhop broken

  • CSGO recently moved logic from 'client_panorama.dll' to 'client.dll', you must update all code that uses 'client_panorama.dll' and replace it with 'client.dll' or the code will not work.
Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

SuchJitter

Newbie
Full Member
Jul 21, 2017
12
42
0
I have been trying to make a external bhop hack for days now, I just can't figure out what I do wrong, can someone please help me?

C++:
#include <iostream>
#include <Windows.h>
#include "Attach.h"

using namespace std;

DWORD playerBase = 0xAAFFFC;
DWORD flags = 0x00000100;
DWORD ForceJump = 0x04F2379C;
DWORD Client;
DWORD fFlags;


int main()
{
    gMemory->Process("csgo.exe");
    Sleep(200);
    gMemory->Module("client.dll", Client);
    SetConsoleTitle("CSGO Private BHOP Hack");
    Sleep(50);
    cout << "Found Process and succesfully attached!" << endl;

    while (true)
    {
        DWORD dwLocalPlayer = gMemory->Read<DWORD>(Client + playerBase);
        DWORD fFlags = gMemory->Read<DWORD>(dwLocalPlayer + flags);
        
        // Check player is holding F
        if (GetAsyncKeyState(0x46) && 0x8000)
        {
            if (fFlags == 257)
            {
                //writing to memory
                gMemory->Write(Client + ForceJump, 5);
                Sleep(5);
                gMemory->Write(Client + ForceJump, 4);
            }
        }
        Sleep(5);
    }

    return EXIT_SUCCESS;
}
C++:
#pragma once
#include <Windows.h>


// Basic memory class

class Memory {
public:
    DWORD hPID;
    HANDLE hProc;


    bool Process(char* ProcessName);
                                    
    DWORD Module(LPSTR ModuleName, DWORD&);


                                            
    template <class cData>
    cData Read(DWORD dwAddress)
    {
        cData cRead;
        ReadProcessMemory(hProc, (LPVOID)dwAddress, &cRead, sizeof(cData), NULL);
        return cRead;
    }

    template <class cData>
    void Write(DWORD addr, cData val) {
        WriteProcessMemory(hProc, (LPVOID)addr, &val, sizeof(cData), NULL);
    }
};


extern Memory* gMemory;
C++:
#include "Attach.h"
#include <TlHelp32.h>



Memory* gMemory = new Memory();


bool Memory::Process(char * ProcessName)
{
    HANDLE hhPID = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
    PROCESSENTRY32 ProcEntry;
    ProcEntry.dwSize = sizeof(ProcEntry);


    do
        if (!strcmp(ProcEntry.szExeFile, ProcessName))
        {


            Memory::hPID = ProcEntry.th32ProcessID;
            CloseHandle(hhPID);


            Memory::hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, Memory::hPID);
            return true;
        }
    while (Process32Next(hhPID, &ProcEntry));
    return false;
}

DWORD Memory::Module(LPSTR ModuleName, DWORD& modSizeTo)
{
    HANDLE hModule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, Memory::hPID);
    MODULEENTRY32 mEntry;
    mEntry.dwSize = sizeof(mEntry);


    do
        if (!strcmp(mEntry.szModule, ModuleName))
        {
            CloseHandle(hModule);
            modSizeTo = mEntry.modBaseSize;
            return (DWORD)mEntry.modBaseAddr;
        }
    while (Module32Next(hModule, &mEntry));
    return 0;
 
Last edited by a moderator:

LaShakun

Jr.Coder
Full Member
Nobleman
Jan 1, 2017
127
2,378
6
How about looking up some tuts and sources:
 
Last edited by a moderator:

Teuvin

now I am become Death
Dank Tier VIP
Trump Tier Donator
Dec 8, 2016
403
10,388
65
If you could specify what's going wrong, what you tried to fix it instead of just giving us the whole and expecting us to read it.

(Also you could at least had chose the C++ Markdown on pastebin)
 

SuchJitter

Newbie
Full Member
Jul 21, 2017
12
42
0
If you could specify what's going wrong, what you tried to fix it instead of just giving us the whole and expecting us to read it.

(Also you could at least had chose the C++ Markdown on pastebin)
I'm sorry. The compiler does not give any error, but when I run the program it loads, but the bhop doesnt work. I think it is something with the writing to memory, because if I cout the value for flags, it will give me the correct numbers. If I press F, nothing happens
 
Last edited:

Teuvin

now I am become Death
Dank Tier VIP
Trump Tier Donator
Dec 8, 2016
403
10,388
65
I'm sorry. The compiler does not give any error, but when I run the program it loads, but the bhop doesnt work. I think it is something with the writing to memory, because if I cout the value for flags, it will give me the correct numbers. If I press F, nothing happens
uh
C++:
  if (GetAsyncKeyState(0x46) && 0x8000)
should be
C++:
  if (GetAsyncKeyState(0x46) & 0x8000)
Dont confuse Logical operators with bit-wise operators
 

SuchJitter

Newbie
Full Member
Jul 21, 2017
12
42
0
uh
C++:
  if (GetAsyncKeyState(0x46) && 0x8000)
should be
C++:
  if (GetAsyncKeyState(0x46) & 0x8000)
Dont confuse Logical operators with bit-wise operators
Thanks for your answer! But, unfortunately, this didn't work for me, still, when I hold the F key, it just inspects the knife, and it doesn't jump.
I have deleted the GetAsyncKeyState part, just for now, so we can check what is wrong. I think something is wrong with the writing to memory part.

C++:
#include <iostream>
#include <Windows.h>
#include "Attach.h"

using namespace std;

DWORD playerBase = 0xAAFFFC;
DWORD flags = 0x00000100;
DWORD ForceJump = 0x04F2379C;
DWORD Client;
DWORD fFlags;


int main()
{
	gMemory->Process("csgo.exe");
	Sleep(200);
	gMemory->Module("client.dll", Client);
	SetConsoleTitle("CSGO Private BHOP Hack");
	Sleep(50);
	cout << "Found Process and succesfully attached!" << endl;

	while (true)
	{
		gMemory->Write(Client + ForceJump, 5);
		Sleep(5);
		gMemory->Write(Client + ForceJump, 4);
	}
}
 
Last edited:

Teuvin

now I am become Death
Dank Tier VIP
Trump Tier Donator
Dec 8, 2016
403
10,388
65
Thanks for your answer! But, unfortunately, this didn't work for me, still, when I hold the F key, it just inspects the knife, and it doesn't jump.
I have deleted the GetAsyncKeyState part, just for now, so we can check what is wrong. I think something is wrong with the writing to memory part.

C++:
#include <iostream>
#include <Windows.h>
#include "Attach.h"

using namespace std;

DWORD playerBase = 0xAAFFFC;
DWORD flags = 0x00000100;
DWORD ForceJump = 0x04F2379C;
DWORD Client;
DWORD fFlags;


int main()
{
	gMemory->Process("csgo.exe");
	Sleep(200);
	gMemory->Module("client.dll", Client);
	SetConsoleTitle("CSGO Private BHOP Hack");
	Sleep(50);
	cout << "Found Process and succesfully attached!" << endl;

	while (true)
	{
		gMemory->Write(Client + ForceJump, 5);
		Sleep(5);
		gMemory->Write(Client + ForceJump, 4);
	}
}
As I don't know much about templates try modifying procmem template to the basic one
C++:
template<typename TYPE>
TYPE ReadMemory(DWORD address){
	TYPE buffer;
	ReadProcessMemory(hProc, (LPCVOID)address, &buffer, sizeof(buffer), 0);
	return buffer;
}
 
template<typename TYPE>
void WriteMemory(DWORD address, TYPE DataWrite){
	TYPE buffer = DataWrite;
	WriteProcessMemory(hProc, (LPVOID)address, &buffer, sizeof(buffer), 0);
}
 

SuchJitter

Newbie
Full Member
Jul 21, 2017
12
42
0
As I don't know much about templates try modifying procmem template to the basic one
C++:
template<typename TYPE>
TYPE ReadMemory(DWORD address){
	TYPE buffer;
	ReadProcessMemory(hProc, (LPCVOID)address, &buffer, sizeof(buffer), 0);
	return buffer;
}
 
template<typename TYPE>
void WriteMemory(DWORD address, TYPE DataWrite){
	TYPE buffer = DataWrite;
	WriteProcessMemory(hProc, (LPVOID)address, &buffer, sizeof(buffer), 0);
}
Still nothin :(

ProcMem.h:
C++:
#pragma once
#include <Windows.h>


// Basic memory class

class Memory {
public:
	DWORD hPID;
	HANDLE hProc;


	bool Process(char* ProcessName);

	DWORD Module(LPSTR ModuleName, DWORD&);



	template<typename TYPE>
	TYPE ReadMemory(DWORD address) {
		TYPE buffer;
		ReadProcessMemory(hProc, (LPCVOID)address, &buffer, sizeof(buffer), 0);
		return buffer;
	}

	template<typename TYPE>
	void WriteMemory(DWORD address, TYPE DataWrite) {
		TYPE buffer = DataWrite;
		WriteProcessMemory(hProc, (LPVOID)address, &buffer, sizeof(buffer), 0);
	}
};


extern Memory* gMemory;
ProcMem.cpp:
C++:
#include "ProcMem.h"
#include <TlHelp32.h>



Memory* gMemory = new Memory();


bool Memory::Process(char * ProcessName)
{
	HANDLE hhPID = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
	PROCESSENTRY32 ProcEntry;
	ProcEntry.dwSize = sizeof(ProcEntry);


	do
		if (!strcmp(ProcEntry.szExeFile, ProcessName))
		{


			Memory::hPID = ProcEntry.th32ProcessID;
			CloseHandle(hhPID);


			Memory::hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, Memory::hPID);
			return true;
		}
	while (Process32Next(hhPID, &ProcEntry));
	return false;
}

DWORD Memory::Module(LPSTR ModuleName, DWORD& modSizeTo)
{
	HANDLE hModule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, Memory::hPID);
	MODULEENTRY32 mEntry;
	mEntry.dwSize = sizeof(mEntry);


	do
		if (!strcmp(mEntry.szModule, ModuleName))
		{
			CloseHandle(hModule);
			modSizeTo = mEntry.modBaseSize;
			return (DWORD)mEntry.modBaseAddr;
		}
	while (Module32Next(hModule, &mEntry));
	return 0;
}
Main.cpp
C++:
#include <iostream>
#include <Windows.h>
#include "ProcMem.h"

using namespace std;

DWORD playerBase = 0xAAFFFC;
DWORD flags = 0x00000100;
DWORD ForceJump = 0x04F2379C;
DWORD Client;
DWORD fFlags;


int main()
{
	gMemory->Process("csgo.exe");
	Sleep(200);
	gMemory->Module("client.dll", Client);
	SetConsoleTitle("CSGO Private BHOP Hack");
	Sleep(50);
	cout << "Found Process and succesfully attached!" << endl;

	while (true)
	{
		DWORD dwLocalPlayer = gMemory->ReadMemory<DWORD>(Client + playerBase);
		DWORD fFlags = gMemory->ReadMemory<DWORD>(dwLocalPlayer + flags);

		// Check player is holding F
		if (GetAsyncKeyState(0x46) && 0x8000)
		{
			if (fFlags == 257)
			{
				//writing to memory
				gMemory->WriteMemory(Client + ForceJump, 5);
				Sleep(5);
				gMemory->WriteMemory(Client + ForceJump, 4);
			}
		}
		Sleep(5);
	}

	return EXIT_SUCCESS;
}
 

Teuvin

now I am become Death
Dank Tier VIP
Trump Tier Donator
Dec 8, 2016
403
10,388
65
C++:
  gMemory->WriteMemory(Client + ForceJump, 5);
                Sleep(5);
                gMemory->WriteMemory(Client + ForceJump, 4);
should be
C++:
  gMemory->WriteMemory<int>(Client + ForceJump, 5);
                Sleep(5);
                gMemory->WriteMemory<int>(Client + ForceJump, 4);
 

Roman_Ablo

Banned
Feb 27, 2017
355
2,402
1
do not fear my b o i, axion the l33t h4x00r is here to fix ur code

im writing it in notepad rn will update after's done

it may not work, but it doesnt matter :4head:

EDIT: ok so i downloaded shitty dev-c++ to make sure im actually writing this well but its compiler is so fucking old so u better hope u have smth like visual studio for dis, k?

! not tested, boi !

C++:
#include <iostream>
#include <windows.h>
#include <Tlhelp32.h>
 
UINT_PTR playerBase = 0xAAFFFC;
UINT_PTR flags = 0x00000100;
UINT_PTR ForceJump = 0x04F2379C;
UINT_PTR Client;
UINT_PTR fFlags;

DWORD y_GetID(const wchar_t *y_Proc)
{
	if(!y_Proc)
		return nullptr;
    DWORD y_pID = NULL;
    HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
	if(!hSnap)
		return nullptr;
    PROCESSENTRY32W PE32W;
    PE32W.dwSize { sizeof(PROCESSENTRY32W) };
    if (Process32FirstW(hSnap, &PE32W))
    {
        do
        {
            if (_wcsicmp(y_Proc, PE32W.szExeFile) == 0)
            {
               y_pID = PE32W.th32ProcessID;
               break;
            }
        } 
		while (Process32NextW(hSnap, &PE32W));
    }
    CloseHandle(hSnap);
    
    if(!y_pID)
    	return nullptr;
    return y_pID;
}

HANDLE y_GetHandle(const wchar_t *y_Proc, DWORD hAccess)
{
	if(!y_Proc)
		return nullptr;
    DWORD y_pID = NULL;
    HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
	if(!hSnap)
		return nullptr;
    PROCESSENTRY32W PE32W;
    PE32W.dwSize { sizeof(PROCESSENTRY32W) };
    if (Process32FirstW(hSnap, &PE32W))
    {
        do
        {
            if (_wcsicmp(y_Proc, PE32W.szExeFile) == 0)
            {
               y_pID = PE32W.th32ProcessID;
               break;
            }
        } 
		while (Process32NextW(hSnap, &PE32W));
    }
    CloseHandle(hSnap);
    
    if(!y_pID)
    	return nullptr;
    return OpenProcess(hAccess, FALSE, y_pID);
}

BOOL y_SeDebugPriv(BOOL y_Stat == FALSE) {
	HANDLE hToken = nullptr;
	if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES, &hToken)) 
		return FALSE;	
	TOKEN_PRIVILEGES TokenPrivileges = { 0 };
	TokenPrivileges.PrivilegeCount = 1;
	TokenPrivileges.Privileges[0].Attributes = y_Stat ? SE_PRIVILEGE_ENABLED : 0;
	if (!LookupPrivilegeValueA(nullptr, "SeDebugPrivilege", &TokenPrivileges.Privileges[0].Luid)){
		CloseHandle(hToken);
		return FALSE;
	}

	if (!AdjustTokenPrivileges(hToken, FALSE, &TokenPrivileges, sizeof(TOKEN_PRIVILEGES), nullptr, nullptr)){
		CloseHandle(hToken);
		return FALSE;
	}
	CloseHandle(hToken);
	return TRUE;
}

DWORD y_GetModBase(const wchar_t *y_mName, DWORD y_pID)
{
	if(!y_pID || !y_mName)
		return NULL;
    DWORD y_mBase = 0;
    HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, y_pID);
    if(!hSnap)
    	return NULL;
    MODULEENTRY32 ME32;
    ME32.dwSize { sizeof(MODULEENTRY32) };
    if (Module32First(hSnap, &ME32))
    {
        do
        {
        	if (_wcsicmp(y_mName, ME32.szModule) == 0)
            {
            	y_mBase = reinterpret_cast<DWORD>(ME32.modBaseAddr);
            	break;
            }
        } 
		while (Module32Next(hSnap, &ME32));
    }
    CloseHandle(hSnap);
    
    if(!y_mBase)
    	return NULL;
    return y_mBase;
}
 
UINT_PTR y_GetDMA(HANDLE y_Proc, DWORD y_Base, BYTE y_Offsets[], size_t y_Level)
{
    if (!ReadProcessMemory(y_Proc, reinterpret_cast<void*>(y_Base), &y_Base, sizeof(y_Base), nullptr))
    	return NULL;
 
    for (int32_t i = 0; i < y_Offsets; i++)
    {
        if (!ReadProcessMemory(y_Proc, reinterpret_cast<void*>(y_Base + y_Offsets[i]), &y_Base, sizeof(y_Base), nullptr))
	        return NULL;
    }
    return y_Base;	
}

int main()
{
	if(!y_SeDebugPriv(TRUE))
		return EXIT_FAILURE;
	DWORD zPID = y_GetID(L"csgo.exe");
    HANDLE hProc = y_GetHandle(L"csgo.exe", PROCESS_ALL_ACCESS);
    DWORD mBase = y_GetModBase(L"client.dll", zPID);
    
    SetConsoleTitle("nfkrz bangerz mobile auto manual hack cheat bypass");

    std::cout << "Found Process and succesfully attached!1!!!!!!!!!!!1\n";
 
    for(;;)
    {
        DWORD dwLocalPlayer = NULL;
		ReadProcessMemory(hProc, reinterpret_cast<void*>(Client+playerBase), &dwLocalPlayer, sizeof(dwLocalPlayer), nullptr);
        DWORD fFlags = NULL;
		ReadProcessMemory(hProc, reinterpret_cast<void*>(dwLocalPlayer+flags), &fFlags, sizeof(fFlags), nullptr);
        
        if (!GetAsyncKeyState(0x46)); //Make sure this shetty getasynckeystate worx for u, just
        //make another proj and try to make sure. u als dont need anythin else added to it 
        else
		{
            if (fFlags == 257)
            {
            	size_t Val1 = 5;
            	size_t Val2 = 4;
            	//NOT THE BEST THING TO DO THIS BUT IT DOESNT MATTER K?
				WriteProcessMemory(hProc, reinterpret_cast<void*>(Client+ForceJump), &Val1, sizeof(Val1), nullptr);
				Sleep(20);
                WriteProcessMemory(hProc, reinterpret_cast<void*>(Client+ForceJump), &Val2, sizeof(Val2), nullptr);
            }
            
            //TO EXIT
            if(!GetAsyncKeyState(VK_F1));
            else
            	break;
        }
        Sleep(5);
    }
 
 	std::cout << "SUCCCCESSS!1\n";
    return EXIT_SUCCESS;
}

-- pls dont bully me for my shetty code plz thx
 
Last edited:

Traxin

Escobar Tier VIP
Dank Tier Donator
Aug 3, 2015
1,041
25,378
154
Highly recommended to either implement some error checking or at the least you should bust out the debugger and check if your WPM/RPM calls are returning successfully.
I don't see any calls to VirtualProtectEx to make sure you have permissions to actually read/write to memory.
Your Process function returns bool upon failure or success, yet you don't bother to check if they did indeed succeed or not. You automatically assume the game is found and attached.
Your module function returns the base address while the second parameter stores the size of the module. Client is not going to be correct here.

Obv, like Teuvin mentioned, if you're using a templated function you need to specify the data type in the <angle_brackets> after the function name like it's done in the first two calls to ReadMemory.

I think that about sums up all the issues with this code.
The game breaker here is probably your Module bullshit, that shit is all wrong.
 

Teuvin

now I am become Death
Dank Tier VIP
Trump Tier Donator
Dec 8, 2016
403
10,388
65
do not fear my b o i, axion the l33t h4x00r is here to fix ur code
You literally wrote a code from 0 and pasted it here, you are not fixing his code you are just giving him another one :ressleeper:
 

Roman_Ablo

Banned
Feb 27, 2017
355
2,402
1
You literally wrote a code from 0 and pasted it here, you are not fixing his code you are just giving him another one :ressleeper:
no offense to him, i was just like him a few months ago but his code was unfixable and shit (not that mine is that much better still) and i'd rather gib smth better. he is trying to make a cheat for CS:GO after all, might aswell be gut


@OP shuld debug his code with cout :DatSheffy:
 

Traxin

Escobar Tier VIP
Dank Tier Donator
Aug 3, 2015
1,041
25,378
154
no offense to him, i was just like him a few months ago but his code was unfixable and shit (not that mine is that much better still) and i'd rather gib smth better. he is trying to make a cheat for CS:GO after all, might aswell be gut


@OP shuld debug his code with cout :DatSheffy:
There was maybe 1 mistake in the code that made it not work. It wasn't anywhere near unfixable o_O
You also followed right in suit with the OP and didn't include any real error checking in your main.
 

SuchJitter

Newbie
Full Member
Jul 21, 2017
12
42
0
There was maybe 1 mistake in the code that made it not work. It wasn't anywhere near unfixable o_O
You also followed right in suit with the OP and didn't include any real error checking in your main.
Thanks for your help guys :)

So you guys recommend me to use a better memory class??
I'm sorry that i'm a newbie, but hey, everyone has to start somewhere.

EDIT: So, I have used an original memory class, still nothing
ProcMem.h
C++:
#ifndef PROCMEM_H
#define PROCMEM_H

#define WIN32_LEAN_AND_MEAN

#include <windows.h>
#include <iostream>
#include <TlHelp32.h>
#include <string>
#include <sstream>

class ProcMem {
protected:


public:

	DWORD *base; //Stores Module Base Address
	DWORD Proc_ID; //Varible to store Process ID
	HANDLE hProcess;
	DWORD dwPID, dwProtection, dwCaveAddress;


	BOOL bPOn, bIOn, bProt;

public:


	ProcMem();
	~ProcMem();
	int chSizeOfArray(char *chArray);
	int iSizeOfArray(int *iArray);
	bool iFind(int *iAry, int iVal);

#pragma region TEMPLATE MEMORY FUNCTIONS





	template <class cData>
	cData Read(DWORD dwAddress)
	{
		cData cRead;
		ReadProcessMemory(hProcess, (LPVOID)dwAddress, &cRead, sizeof(cData), NULL);
		return cRead;
	}


	template <class cData>
	cData Read(DWORD dwAddress, char *Offset, BOOL Type)
	{

		int iSize = iSizeOfArray(Offset) - 1;
		dwAddress = Read<DWORD>(dwAddress);


		for (int i = 0; i < iSize; i++)
			dwAddress = Read<DWORD>(dwAddress + Offset[i]);

		if (!Type)
			return dwAddress + Offset[iSize];
		else
			return Read<cData>(dwAddress + Offset[iSize]);
	}


	template <class cData>
	void Read(DWORD dwAddress, cData Value)
	{
		ReadProcessMemory(hProcess, (LPVOID)dwAddress, &Value, sizeof(cData), NULL);
	}


	template <class cData>
	void Read(DWORD dwAddress, char *Offset, cData Value)
	{
		Read<cData>(Read<cData>(dwAddress, Offset, false), Value);
	}


	virtual void Process(char* ProcessName);
	virtual void Patch(DWORD dwAddress, char *chPatch_Bts, char *chDefault_Bts);
	virtual DWORD AOB_Scan(DWORD dwAddress, DWORD dwEnd, char *chPattern);
	virtual DWORD Module(LPSTR ModuleName);

	//WRITE MEMORY
	template <class cData>

	cData Write(DWORD(Address), cData B) {
		try {
			if (Proc_ID > 0) {
				WriteProcessMemory(hProcess, (LPVOID)(Address), &B, sizeof(B), NULL);
				return B;
			}
			else {
				throw 1; //Throw Error Number / Defined In Catch
			}
		} // Try End
		catch (int error) {
		} //Catch End

		return 0;
	} //Write End
#pragma endregion

};
#endif
ProcMem.cpp
C++:
#include "ProcMem.h"

using namespace std;

#pragma region Misc Functions

ProcMem::ProcMem() {

}

ProcMem::~ProcMem() {
	CloseHandle(hProcess);
}


int ProcMem::chSizeOfArray(char *chArray) {


	for (int iLength = 1; iLength < MAX_PATH; iLength++)
		if (chArray[iLength] == '*')
			return iLength;

	cout << "\nLENGTH: Failed To Read Length Of Array\n";
	return 0;
}


int ProcMem::iSizeOfArray(int *iArray) {


	for (int iLength = 1; iLength < MAX_PATH; iLength++)
		if (iArray[iLength] == '*')
			return iLength;

	cout << "\nLENGTH: Failed To Read Length Of Array\n";
	return 0;
}


bool ProcMem::iFind(int *iAry, int iVal) {

	for (int i = 0; i < 64; i++)
		if (iVal == iAry[i] && iVal != 0)
			return true;

	return false;
}

#pragma endregion



#pragma region Memory Functions


void ProcMem::Process(char* ProcessName) {


	HANDLE hPID = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
	PROCESSENTRY32 ProcEntry;
	ProcEntry.dwSize = sizeof(ProcEntry);


	do
		if (!strcmp(ProcEntry.szExeFile, ProcessName))
		{


			dwPID = ProcEntry.th32ProcessID;
			CloseHandle(hPID);


			hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPID);
			return;
		}
	while (Process32Next(hPID, &ProcEntry));

	cout << "\nCould not find the process csgo.exe...\n\n";
	system("pause");
	exit(0);
}


void ProcMem::Patch(DWORD dwAddress, char *Patch_Bts, char *Default_Bts) {


	int iSize = chSizeOfArray(Default_Bts);


	if (!bPOn)
		for (int i = 0; i < iSize; i++)
			Read<BYTE>(dwAddress + i, Patch_Bts[i]);
	else
		for (int i = 0; i < iSize; i++)
			Read<BYTE>(dwAddress + i, Default_Bts[i]);

	bPOn = !bPOn;
}

DWORD ProcMem::AOB_Scan(DWORD dwAddress, DWORD dwEnd, char *Bytes) {


	int iBytesToRead = 0, iTmp = 0;
	int length = chSizeOfArray(Bytes);
	bool bTmp = false;


	if (Bytes[0] == '?')
	{
		for (; iBytesToRead < MAX_PATH; iBytesToRead++)
			if (Bytes[iBytesToRead] != '?')
			{
				iTmp = (iBytesToRead + 1);
				break;
			}
	}


	for (; dwAddress < dwEnd; dwAddress++)
	{
		if (iBytesToRead == length)
			return dwAddress - iBytesToRead;

		if (Read<BYTE>(dwAddress) == Bytes[iBytesToRead] || (bTmp && Bytes[iBytesToRead] == '?'))
		{
			iBytesToRead++;
			bTmp = true;
		}
		else
		{
			iBytesToRead = iTmp;
			bTmp = false;
		}
	}

	cout << "\nAOB_SCAN: Failed To Find Byte Pattern\n\n";
	return 0;
}


DWORD ProcMem::Module(LPSTR ModuleName) {


	HANDLE hModule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwPID);
	MODULEENTRY32 mEntry;
	mEntry.dwSize = sizeof(mEntry);


	do
		if (!strcmp(mEntry.szModule, ModuleName))
		{
			CloseHandle(hModule);
			return (DWORD)mEntry.modBaseAddr;
		}
	while (Module32Next(hModule, &mEntry));

	cout << "\nCould not attach to Client.dll..\n\n";
	return 0;
}

#pragma endregion
main.cpp
C++:
#include <iostream>
#include <Windows.h>
#include "ProcMem.h"

using namespace std;

DWORD playerBase = 0xAAFFFC;
DWORD flags = 0x00000100;
DWORD ForceJump = 0x04F2379C;
DWORD Client;
DWORD fFlags;

ProcMem mem;

int main()
{
	mem.Process("csgo.exe");
	Sleep(200);
	Client = mem.Module("client.dll");
	SetConsoleTitle("CSGO Private BHOP Hack");
	Sleep(50);
	

	while (true)
	{
		DWORD dwLocalPlayer = mem.Read<DWORD>(Client + playerBase);
		DWORD fFlags = mem.Read<DWORD>(dwLocalPlayer + flags);

		// Check player is holding P
		if (GetAsyncKeyState(0x50) & 0x8000)
		{
			if (fFlags == 257)
			{
				//writing to memory
				mem.Write<int>(Client + ForceJump, 5);
				Sleep(5);
				mem.Write<int>(Client + ForceJump, 4);
			}
		}
		Sleep(5);
	}
	

	return EXIT_SUCCESS;
}
 
Last edited:

SuchJitter

Newbie
Full Member
Jul 21, 2017
12
42
0
do not fear my b o i, axion the l33t h4x00r is here to fix ur code

im writing it in notepad rn will update after's done

it may not work, but it doesnt matter :4head:

EDIT: ok so i downloaded shitty dev-c++ to make sure im actually writing this well but its compiler is so fucking old so u better hope u have smth like visual studio for dis, k?

! not tested, boi !

C++:
#include <iostream>
#include <windows.h>
#include <Tlhelp32.h>
 
UINT_PTR playerBase = 0xAAFFFC;
UINT_PTR flags = 0x00000100;
UINT_PTR ForceJump = 0x04F2379C;
UINT_PTR Client;
UINT_PTR fFlags;

DWORD y_GetID(const wchar_t *y_Proc)
{
	if(!y_Proc)
		return nullptr;
    DWORD y_pID = NULL;
    HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
	if(!hSnap)
		return nullptr;
    PROCESSENTRY32W PE32W;
    PE32W.dwSize { sizeof(PROCESSENTRY32W) };
    if (Process32FirstW(hSnap, &PE32W))
    {
        do
        {
            if (_wcsicmp(y_Proc, PE32W.szExeFile) == 0)
            {
               y_pID = PE32W.th32ProcessID;
               break;
            }
        } 
		while (Process32NextW(hSnap, &PE32W));
    }
    CloseHandle(hSnap);
    
    if(!y_pID)
    	return nullptr;
    return y_pID;
}

HANDLE y_GetHandle(const wchar_t *y_Proc, DWORD hAccess)
{
	if(!y_Proc)
		return nullptr;
    DWORD y_pID = NULL;
    HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
	if(!hSnap)
		return nullptr;
    PROCESSENTRY32W PE32W;
    PE32W.dwSize { sizeof(PROCESSENTRY32W) };
    if (Process32FirstW(hSnap, &PE32W))
    {
        do
        {
            if (_wcsicmp(y_Proc, PE32W.szExeFile) == 0)
            {
               y_pID = PE32W.th32ProcessID;
               break;
            }
        } 
		while (Process32NextW(hSnap, &PE32W));
    }
    CloseHandle(hSnap);
    
    if(!y_pID)
    	return nullptr;
    return OpenProcess(hAccess, FALSE, y_pID);
}

BOOL y_SeDebugPriv(BOOL y_Stat == FALSE) {
	HANDLE hToken = nullptr;
	if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES, &hToken)) 
		return FALSE;	
	TOKEN_PRIVILEGES TokenPrivileges = { 0 };
	TokenPrivileges.PrivilegeCount = 1;
	TokenPrivileges.Privileges[0].Attributes = y_Stat ? SE_PRIVILEGE_ENABLED : 0;
	if (!LookupPrivilegeValueA(nullptr, "SeDebugPrivilege", &TokenPrivileges.Privileges[0].Luid)){
		CloseHandle(hToken);
		return FALSE;
	}

	if (!AdjustTokenPrivileges(hToken, FALSE, &TokenPrivileges, sizeof(TOKEN_PRIVILEGES), nullptr, nullptr)){
		CloseHandle(hToken);
		return FALSE;
	}
	CloseHandle(hToken);
	return TRUE;
}

DWORD y_GetModBase(const wchar_t *y_mName, DWORD y_pID)
{
	if(!y_pID || !y_mName)
		return NULL;
    DWORD y_mBase = 0;
    HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, y_pID);
    if(!hSnap)
    	return NULL;
    MODULEENTRY32 ME32;
    ME32.dwSize { sizeof(MODULEENTRY32) };
    if (Module32First(hSnap, &ME32))
    {
        do
        {
        	if (_wcsicmp(y_mName, ME32.szModule) == 0)
            {
            	y_mBase = reinterpret_cast<DWORD>(ME32.modBaseAddr);
            	break;
            }
        } 
		while (Module32Next(hSnap, &ME32));
    }
    CloseHandle(hSnap);
    
    if(!y_mBase)
    	return NULL;
    return y_mBase;
}
 
UINT_PTR y_GetDMA(HANDLE y_Proc, DWORD y_Base, BYTE y_Offsets[], size_t y_Level)
{
    if (!ReadProcessMemory(y_Proc, reinterpret_cast<void*>(y_Base), &y_Base, sizeof(y_Base), nullptr))
    	return NULL;
 
    for (int32_t i = 0; i < y_Offsets; i++)
    {
        if (!ReadProcessMemory(y_Proc, reinterpret_cast<void*>(y_Base + y_Offsets[i]), &y_Base, sizeof(y_Base), nullptr))
	        return NULL;
    }
    return y_Base;	
}

int main()
{
	if(!y_SeDebugPriv(TRUE))
		return EXIT_FAILURE;
	DWORD zPID = y_GetID(L"csgo.exe");
    HANDLE hProc = y_GetHandle(L"csgo.exe", PROCESS_ALL_ACCESS);
    DWORD mBase = y_GetModBase(L"client.dll", zPID);
    
    SetConsoleTitle("nfkrz bangerz mobile auto manual hack cheat bypass");

    std::cout << "Found Process and succesfully attached!1!!!!!!!!!!!1\n";
 
    for(;;)
    {
        DWORD dwLocalPlayer = NULL;
		ReadProcessMemory(hProc, reinterpret_cast<void*>(Client+playerBase), &dwLocalPlayer, sizeof(dwLocalPlayer), nullptr);
        DWORD fFlags = NULL;
		ReadProcessMemory(hProc, reinterpret_cast<void*>(dwLocalPlayer+flags), &fFlags, sizeof(fFlags), nullptr);
        
        if (!GetAsyncKeyState(0x46)); //Make sure this shetty getasynckeystate worx for u, just
        //make another proj and try to make sure. u als dont need anythin else added to it 
        else
		{
            if (fFlags == 257)
            {
            	size_t Val1 = 5;
            	size_t Val2 = 4;
            	//NOT THE BEST THING TO DO THIS BUT IT DOESNT MATTER K?
				WriteProcessMemory(hProc, reinterpret_cast<void*>(Client+ForceJump), &Val1, sizeof(Val1), nullptr);
				Sleep(20);
                WriteProcessMemory(hProc, reinterpret_cast<void*>(Client+ForceJump), &Val2, sizeof(Val2), nullptr);
            }
            
            //TO EXIT
            if(!GetAsyncKeyState(VK_F1));
            else
            	break;
        }
        Sleep(5);
    }
 
 	std::cout << "SUCCCCESSS!1\n";
    return EXIT_SUCCESS;
}

-- pls dont bully me for my shetty code plz thx
Thanks, but there are 8 mistakes in your code, you tried :)

Maybe something is wrong with my settings, could also be the problem. I'm using Visual Studio 2017 btw.
 

SuchJitter

Newbie
Full Member
Jul 21, 2017
12
42
0
Will do, btw i'm 99% sure the problem lays at the wpm, because if i do something like this:
C++:
#include <iostream>
#include <Windows.h>
#include "ProcMem.h"

using namespace std;

DWORD playerBase = 0xAAFFFC;
DWORD flags = 0x00000100;
DWORD ForceJump = 0x04F2379C;
DWORD Client;
DWORD fFlags;

ProcMem mem;

int main()
{
	mem.Process("csgo.exe");
	Sleep(200);
	Client = mem.Module("client.dll");
	SetConsoleTitle("CSGO Private BHOP Hack");
	Sleep(50);
	
	if (true)
	{
		cout << "Succesfully found process and attached!" << endl;

	}

	while (true)
	{
		DWORD dwLocalPlayer = mem.Read<DWORD>(Client + playerBase);
		DWORD fFlags = mem.Read<DWORD>(dwLocalPlayer + flags);

		// Check player is holding P
		if (GetAsyncKeyState(0x50) & 0x8000)
		{
			if (fFlags == 257)
			{
				cout << "heck yeah" << endl;
				//writing to memory
				mem.Write<BYTE>(Client + ForceJump, 5);
				Sleep(5);
				mem.Write<BYTE>(Client + ForceJump, 4);
			}
		}
		Sleep(5);
	}
	

	return EXIT_SUCCESS;
}
I get this:
https://gyazo.com/c1186929d92e9042dfa9930578962b48

And rpm is not the problem, because if im in the air, it won't say "heck yeah".
 

Roman_Ablo

Banned
Feb 27, 2017
355
2,402
1
because my code is C++11 and if u run it in shitty Dev-C++ or CodeBlock ofc it wont fucken work. It compiler and works for me.

Please update to VS2015 at least

There was maybe 1 mistake in the code that made it not work. It wasn't anywhere near unfixable o_O
You also followed right in suit with the OP and didn't include any real error checking in your main.
Well it wasn't unfixable but it wasn't good either
And if you say that you probably didn't even bother to read the code, thx mr global mod
 

Teuvin

now I am become Death
Dank Tier VIP
Trump Tier Donator
Dec 8, 2016
403
10,388
65
Will do, btw i'm 99% sure the problem lays at the wpm, because if i do something like this:

I get this:
https://gyazo.com/c1186929d92e9042dfa9930578962b48

And rpm is not the problem, because if im in the air, it won't say "heck yeah".
How about we just use the good-ol'-no-template Writeprocessmemory? Then we can narrow the problem source down.
C++:
int jump = 5;
int nJump = 4;
WriteProcessMemory(TheHandle,(LPVOID)(Client + ForceJump),&jump,sizeof(jump),nullptr);
Sleep(5);
WriteProcessMemory(TheHandle,(LPVOID)(Client + ForceJump),&nJump,sizeof(jump),nullptr);
Please change "TheHandle" to your csgo handle.
 

SuchJitter

Newbie
Full Member
Jul 21, 2017
12
42
0
How about we just use the good-ol'-no-template Writeprocessmemory? Then we can narrow the problem source down.
C++:
int jump = 5;
int nJump = 4;
WriteProcessMemory(TheHandle,(LPVOID)(Client + ForceJump),&jump,sizeof(jump),nullptr);
Sleep(5);
WriteProcessMemory(TheHandle,(LPVOID)(Client + ForceJump),&nJump,sizeof(jump),nullptr);
Please change "TheHandle" to your csgo handle.
Nothing happened :(
it looks like this now:
C++:
#include <iostream>
#include <Windows.h>
#include "ProcMem.h"

using namespace std;

DWORD playerBase = 0xAAFFFC;
DWORD flags = 0x00000100;
DWORD ForceJump = 0x04F2379C;
DWORD Client;
DWORD fFlags;
HANDLE hProcess;

ProcMem mem;

int main()
{
	mem.Process("csgo.exe");
	Sleep(200);
	Client = mem.Module("client.dll");
	SetConsoleTitle("CSGO Private BHOP Hack");
	Sleep(50);
	
	if (true)

	while (true)
	{
		DWORD dwLocalPlayer = mem.Read<DWORD>(Client + playerBase);
		DWORD fFlags = mem.Read<DWORD>(dwLocalPlayer + flags);

		// Check player is holding P
		if (GetAsyncKeyState(0x50) & 0x8000)
		{
			if (fFlags == 257)
			{
				//writing to memory
				int jump = 5;
				int nJump = 4;
				WriteProcessMemory(hProcess, (LPVOID)(Client + ForceJump), &jump, sizeof(jump), nullptr);
				Sleep(5);
				WriteProcessMemory(hProcess, (LPVOID)(Client + ForceJump), &nJump, sizeof(jump), nullptr);
			}
		}
		Sleep(5);
	}
	

	return EXIT_SUCCESS;
}
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods