πŸ‘ This is my BHOP source code

Posts 1–4 of 4 Β· Page 1 of 1
πŸ‘ This is my BHOP source code
[B][COLOR="#0000FF"]IF YOU GUYS WANT TO USE MY CODE FOR MY BHOP SCRIPT AND MAKE IT YOUR OWN, IT WORKS IT IS ALL TESTED JUST MAKE IT IN TO A SCRIPT FILE OR MAKE YOUR OWN HACK WITH IT, IT WAS NOT DETECTED, SO HERE YOU GUYS GO


Β 
SOURCE CODE

Code:
#include <windows.h>
#include <T1Help32.h>
#include <iostream>

#define BHOP_KEY 'C'

struct module_t
{
	DWORD dwBase, dwSize;
};

 //debugger class:
 
 class CDebugger
 {
 private:
	DWORD dwPid;
	HANDLE hProcess;
public:
	bool attach(char" szProcess)
	do {
	if (!strcmp(entry.szExeFile, szProcess));
				{	
					dwPid = entry.th32processID;
					Closehandle(handle);
					hProcess = openprocess(PROCESS_ALL_ACCESS, false, dwPid);
					return true;
				}	
			} while (process32Next(handle, &entry));
		return false;
	}
	
	module_t getmodule(char" szModule)
	{
		HANDLE handle = CreateToolHelp32snapshot(TH32CS_SNAPMODULE, NULL);
		MODULEENTRY32 entry;
		entry.dwSize = sizeof(entry);
		do {
			if (!strcmp(entry.szModule, szModule))
			{
				dwPid = entry.th32processID;
				Closehandle(handle);
				hProcess = openprocess(PROCESS_ALL_ACCESS, false, dwPid);
				return { (DWORD)entry.hmodule, entry.modbasesize };
			}
		} while (module32Next(handle, &entry));
		return{ (DWORD)false, false};
	}
	template<typename T>
	T readmemory(DWORD address)
	{
		t read;
		readprocessmemory(hProcess, address, &read, sizeof(t), 0);
	}
	template<typename T>
	void Writememory(DWORD) address, T value)
	{
		Writeprocessmemory(hProcess, address, &val, sizeof(t), 0);
	}
};

//Offsets:
DWORD dwLocalplayer = 0xA9948C
DWORD dwjump = 0x4AD0374
DWORD dwflags = 0x100;

CDebugger debugger;
module_t modeuleclient;

modeule_t* getmoduleclient()
{
	if (!moduleclient.dwbase && !moduleclient.dwsize) {
		moduleclient = debugger.getmodule("client.dll");
	}
	return &moduleclient;
}

class CBunnyhop
{
public:
	static unsigned long _stdcall threadroutine(void*)
	{
		while (true)
		{
			DWORD dwme = debugger.readmemory<DWORD>(getmoduleclient()->dwBase + dwLocalplayer);
			int canjump = debugger.readmemory<DWORD>(dwMe + dwFlags);
			if ((getasynckeystate(BHOP_KEY) & 0x8000) && (canjump & 0x1 == true)) {
				debugger.writememory<int>(Getmoduleclient()->dwBase +dwJump, 5); 
				sleep(50);
				debugger.writememory<int>(getmoduleclient()->dwBase +dwJump, 4);
			}
		}
	}
};

int main()
{
	while (!debugger.attach("csgo.exe")) {
		sleep(100);
	}
	createthread(0, 0, &CBunnyhop::Threadroutine, 0, 0, 0);
	while(1) {
		sleep(100);
}
Please wrap that in CODE
Each time you are looping your code you are creating a handle to a snapshot of the modules inside the process and iterate through them by comparing cstrings just to get the base address of the module which doesn't change while the game is running.

Get it once, you are wasting way too much performance.

Also, if the module isn't found you are not closing the handle you created to the snapshot. The same goes for your process snapshot handle.
Quote Originally Posted by WasserEsser View Post
Each time you are looping your code you are creating a handle to a snapshot of the modules inside the process and iterate through them by comparing cstrings just to get the base address of the module which doesn't change while the game is running.

Get it once, you are wasting way too much performance.

Also, if the module isn't found you are not closing the handle you created to the snapshot. The same goes for your process snapshot handle.
He probably would know this if he was a programmer... He copied this from fleep and failed at copying
Posts 1–4 of 4 Β· Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us