Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Steam Games Hacks & Cheats › Counter-Strike 2 Hacks › Counter-Strike 2 Coding & Resources › C++ Glow ESP Source (automatically updates offsets)

PostC++ Glow ESP Source (automatically updates offsets)

Posts 1–15 of 48 · Page 1 of 4
ZE
ZER0MEM0RY
C++ Glow ESP Source (automatically updates offsets)
A simple a wallhack for csgo.

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

typedef unsigned char uint8_t;

template <typename T, size_t N>

size_t countof(T(&array)[N])
{
	return N;
}

DWORD dwLocalPlayer; //will be scanned
DWORD dwEntityList;  //will be scanned
DWORD dwGlow;        //will be scanned

DWORD dwTeam = 0xF0;
DWORD dwDormant = 0xE9;

struct PModule
{
	DWORD dwBase;
	DWORD dwSize;
};

/* Debugger/Process API implementation class */
class process
{

public:
	bool Attach(char* pName, DWORD rights)
	{
		HANDLE handle = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
		PROCESSENTRY32 entry;
		entry.dwSize = sizeof(entry);

		do
			if (!strcmp(entry.szExeFile, pName)) {
				pID = entry.th32ProcessID;
				CloseHandle(handle);
				_process = OpenProcess(rights, false, pID);
				return true;
			}
		while (Process32Next(handle, &entry));
		return false;
	}
	PModule GetModule(char* moduleName) {
		HANDLE module = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pID);
		MODULEENTRY32 mEntry;
		mEntry.dwSize = sizeof(mEntry);

		do {
			if (!strcmp(mEntry.szModule, (LPSTR)moduleName)) {
				CloseHandle(module);

				PModule mod = { (DWORD)mEntry.hModule, mEntry.modBaseSize };
				return mod;
			}
		} while (Module32Next(module, &mEntry));

		PModule mod = { (DWORD)false, (DWORD)false };
		return mod;
	}

	template <class T>
	T Read(DWORD addr) {
		T _read;
		ReadProcessMemory(_process, (LPVOID)addr, &_read, sizeof(T), NULL);
		return _read;
	}
	template <class T>
	void Write(DWORD addr, T val) {
		WriteProcessMemory(_process, (LPVOID)addr, &val, sizeof(T), NULL);
	}

	DWORD FindPattern(DWORD start, DWORD size, const char* sig, const char* mask) {
		BYTE* data = new BYTE[size];

		unsigned long bytesRead;
		if (!ReadProcessMemory(_process, (LPVOID)start, data, size, &bytesRead)) {
			return NULL;
		}

		for (DWORD i = 0; i < size; i++) {
			if (DataCompare((const BYTE*)(data + i), (const BYTE*)sig, mask)) {
				return start + i;
			}
		}
		return NULL;
	}

	DWORD FindPatternArray(DWORD start, DWORD size, const char* mask, int count, ...) {
		char* sig = new char[count + 1];
		va_list ap;
		va_start(ap, count);
		for (int i = 0; i < count; i++) {
			char read = va_arg(ap, char);
			sig[i] = read;
		}
		va_end(ap);
		sig[count] = '\0';
		return FindPattern(start, size, sig, mask);
	}


private:
	HANDLE _process;
	DWORD pID;
	bool DataCompare(const BYTE* pData, const BYTE* pMask, const char* pszMask) {
		for (; *pszMask; ++pszMask, ++pData, ++pMask) {
			if (*pszMask == 'x' && *pData != *pMask) {
				return false;
			}
		}
		return (*pszMask == NULL);
	}
};

/* Glow Object structure in csgo */
struct glow_t
{
	DWORD dwBase;
	float r;
	float g;
	float b;
	float a;
	uint8_t unk1[16];
	bool m_bRenderWhenOccluded;
	bool m_bRenderWhenUnoccluded;
	bool m_bFullBloom;
	uint8_t unk2[10];
};

/* Entity structure in csgo */
struct Entity
{
	DWORD dwBase;
	int team;
	bool is_dormant;
};

/* Player structure in csgo */
struct Player
{
	DWORD dwBase;
	bool isDormant;
};

process memory;
process _modClient;
process* mem;
PModule modClient;

int iFriendlies;
int iEnemies;

Entity entEnemies[32];
Entity entFriendlies[32];
Entity me;

void update_entity_data(Entity* e, DWORD dwBase)
{
	int dormant = memory.Read<int>(dwBase + dwDormant);
	e->dwBase = dwBase;
	e->team = memory.Read<int>(dwBase + dwTeam);
	e->is_dormant = dormant == 1;
}
/* Get Pointer To Client.dll*/
PModule* GetClientModule() {
	if (modClient.dwBase == 0 && modClient.dwSize == 0) {
		modClient = memory.GetModule("client.dll");
	}
	return &modClient;
}

Entity* GetEntityByBase(DWORD dwBase) {

	for (int i = 0; i < iFriendlies; i++) {
		if (dwBase == entFriendlies[i].dwBase) {
			return &entFriendlies[i];
		}
	}
	for (int i = 0; i < iEnemies; i++) {
		if (dwBase == entEnemies[i].dwBase) {
			return &entEnemies[i];
		}
	}
	return nullptr;
}

/* offset updating class, that uses patterns to find memory addresses */
class offset
{
private:
	static void update_local_player() {
		DWORD lpStart = mem->FindPatternArray(modClient.dwBase, modClient.dwSize, "xxx????xx????xxxxx?", 19, 0x8D, 0x34, 0x85, 0x0, 0x0, 0x0, 0x0, 0x89, 0x15, 0x0, 0x0, 0x0, 0x0, 0x8B, 0x41, 0x8, 0x8B, 0x48, 0x0);
		DWORD lpP1 = mem->Read<DWORD>(lpStart + 3);
		BYTE lpP2 = mem->Read<BYTE>(lpStart + 18);
		dwLocalPlayer = (lpP1 + lpP2) - modClient.dwBase;
	}

	static void update_entity_list() {
		DWORD elStart = mem->FindPatternArray(modClient.dwBase, modClient.dwSize, "x????xx?xxx", 11, 0x5, 0x0, 0x0, 0x0, 0x0, 0xC1, 0xE9, 0x0, 0x39, 0x48, 0x4);
		DWORD elP1 = mem->Read<DWORD>(elStart + 1);
		BYTE elP2 = mem->Read<BYTE>(elStart + 7);
		dwEntityList = (elP1 + elP2) - modClient.dwBase;
	}

	static void update_glow() {
		DWORD gpStart = mem->FindPatternArray(modClient.dwBase, modClient.dwSize, "xx????x????xxx????xx????xx", 27, 0x8D, 0x8F, 0, 0, 0, 0, 0xA1, 0, 0, 0, 0, 0xC7, 0x4, 0x2, 0, 0, 0, 0, 0x89, 0x35, 0x0, 0x0, 0x0, 0x0, 0x8B, 0x51);
		dwGlow = mem->Read<DWORD>(gpStart + 7) - modClient.dwBase;
	}
public:
	static void get_offset(process* m) {
		mem = m;
		modClient = mem->GetModule("client.dll");
		update_local_player();
		update_entity_list();
		update_glow();
	}

	//constantly scanning & updating our offsets
	static DWORD WINAPI scan_offsets(LPVOID PARAM)
	{
		Entity players[64];
		while (true) {
			DWORD playerBase = memory.Read<DWORD>(GetClientModule()->dwBase + dwLocalPlayer);
			int cp = 0;

			update_entity_data(&me, playerBase);
			for (int i = 1; i < 64; i++) {
				DWORD entBase = memory.Read<DWORD>((GetClientModule()->dwBase + dwEntityList) + i * 0x10);

				if (entBase == NULL)
					continue;

				update_entity_data(&players[cp], entBase);

				cp++;
			}

			int cf = 0, ce = 0;

			for (int i = 0; i < cp; i++) {
				if (players[i].team == me.team) {
					entFriendlies[cf] = players[i];
					cf++;
				}
				else {
					entEnemies[ce] = players[i];
					ce++;
				}
			}
			iEnemies = ce;
			iFriendlies = cf;
		}
	}
};


class virtualesp
{
private:
	static void glow_player(DWORD mObj, float r, float g, float b)
	{
		memory.Write<float>(mObj + 0x4, r);
		memory.Write<float>(mObj + 0x8, g);
		memory.Write<float>(mObj + 0xC, b);
		memory.Write<float>(mObj + 0x10, 1.0f);
		memory.Write<BOOL>(mObj + 0x24, true);
		memory.Write<BOOL>(mObj + 0x25, false);
	}

	static float SanitizeColor(int value)
	{
		if (value > 255) value = 255;
		if (value < 0) value = 0;
		return (float)value / 255;
	}
public:
	static void start_engine() {
		while (!memory.Attach("csgo.exe", PROCESS_ALL_ACCESS)) {
			Sleep(100);
		}
		do {
			Sleep(1000);
			offset::get_offset(&memory);
		} while (dwLocalPlayer < 65535);
		CreateThread(NULL, NULL, &offset::scan_offsets, NULL, NULL, NULL);
	}

	static unsigned long __stdcall esp_thread(void*)
	{
		int objectCount;
		DWORD pointerToGlow;
		Entity* Player = NULL;
		float Friend = SanitizeColor(100);
		float Enemy = SanitizeColor(140);

		while (true)
		{
			pointerToGlow = memory.Read<DWORD>(GetClientModule()->dwBase + dwGlow);
			objectCount = memory.Read<DWORD>(GetClientModule()->dwBase + dwGlow + 0x4);
			if (pointerToGlow != NULL && objectCount > 0)
			{
				for (int i = 0; i < objectCount; i++)
				{
					DWORD mObj = pointerToGlow + i * sizeof(glow_t);
					glow_t glowObject = memory.Read<glow_t>(mObj);
					Player = GetEntityByBase(glowObject.dwBase);

					if (glowObject.dwBase == NULL || Player == nullptr || Player->is_dormant) {
						continue;
					}
					if (me.team == Player->team) {
						glow_player(mObj, 0, 0, Friend);
					}
					else {
						glow_player(mObj, Enemy, 0, 0);
					}
				}
			}
		}
		return EXIT_SUCCESS;
	}
};


int main() 
{
	bool enabled = false;
	HANDLE ESP = NULL;

	virtualesp::start_engine();
	std::cout << "F1 to toggle ESP!" << std::endl;
	while (TRUE)
	{
		if (GetAsyncKeyState(VK_F1) & 1) {
			enabled = !enabled;
			if (enabled) {
				std::cout << "ESP: on" << std::endl;
				ESP = CreateThread(NULL, NULL, &virtualesp::esp_thread, NULL, NULL, NULL);
			}
			else {
				std::cout << "ESP: off" << std::endl;
				TerminateThread(ESP, 0);
				CloseHandle(ESP);
			}
		}
	}
}
video about:
#1 · 11y ago
DadDelta
DadDelta
Wrong Section tho.

Let the leeching and c&p begin!
#2 · 11y ago
[NEWACCOUNT]Yano
[NEWACCOUNT]Yano
Quote Originally Posted by DadDelta View Post
Wrong Section tho.

Let the leeching and c&p begin!
It already began
#3 · 11y ago
sup h0wl
sup h0wl
this code is so ugly man
#4 · 11y ago
US
useurmind
b1g codenz
#5 · 10y ago
ZE
ZER0MEM0RY
Quote Originally Posted by Maned Wolf View Post
this code is so ugly man
Example from ORIGINAL code:

Code:
#ifndef ESP_H
#define ESP_H

#include "process.h"
#include "Engine.h"
#include "offset.h"

class CWallhack
{
private:
	static void glow_player(DWORD mObj, float r, float g, float b);

	static float sanitize_color(int value);
public:
	static void start_engine();

	static unsigned long __stdcall esp_thread(void*);
};
#endif
That's a snippet of the code I first wrote, but I don't feel like I wanted to give it away free since it was such a nice piece of work, instead I tore all the classes apart and just pasted them into a one big source file sorry!
#6 · 10y ago
SK
Skipper9987
sorry for the question is the hack for ever ud ? or what is automatically updates offsets ? or for what is it ?
#7 · 10y ago
DadDelta
DadDelta
Quote Originally Posted by Skipper9987 View Post
sorry for the question is the hack for ever ud ? or what is automatically updates offsets ? or for what is it ?
The Source is detected and auto offset update, also called Pattern Scan, will just update the offsets for the hack needed so u dont have to do it urself. The hack wont get outdated, but is detected if you dont change the source code.
#8 · 10y ago
RO
romnazaro
20 fps ,why so lags?
#9 · 10y ago
Chris
Chris
Quote Originally Posted by romnazaro View Post
20 fps ,why so lags?
Because there is no sleep in the infinite loop, it is draining your CPU.
#10 · 10y ago
DadDelta
DadDelta
Quote Originally Posted by Chris View Post

Because there is no sleep in the infinite loop, it is draining your CPU.
Just a question, how would you do it?
#11 · 10y ago
Chris
Chris
Quote Originally Posted by DadDelta View Post
Just a question, how would you do it?
Step 1: Locate infinite loop.
Step 2: Add a new line to the end of the loop.
Step 3: Call Sleep function, 1 millisecond should be enough.
#12 · 10y ago
DadDelta
DadDelta
Quote Originally Posted by Chris View Post

Step 1: Locate infinite loop.
Step 2: Add a new line to the end of the loop.
Step 3: Call Sleep function, 1 millisecond should be enough.
Thanks, now it runs smooth
#13 · 10y ago
RO
romnazaro
can show where an infinite loop? I can't find it
#14 · 10y ago
Chris
Chris
Quote Originally Posted by romnazaro View Post
can show where an infinite loop? I can't find it
No.
Go lean the basics of C++.
#15 · 10y ago
Posts 1–15 of 48 · Page 1 of 4

Post a Reply

Similar Threads

  • Merccy's Glow ESP - PolyHack - Auto UpdatingBy Merccy2 in Counter-Strike 2 Hacks
    2,403Last post 11y ago
  • UPDATED NO RECOIL SOURCE CODE + UPDATED OFFSETS FOR ITBy mohamed09 in CrossFire Hack Coding / Programming / Source Code
    6Last post 14y ago
  • Merccy's Glow ESP - PolyHack - Auto UpdatingBy Merccy2 in Counter-Strike 2 Hacks
    507Last post 11y ago
  • [PolyHack] Bluehack Remastered v2.4 - Fixed Glow ESP, Flashed Checks, Offsets UpdatedBy T-800 in Counter-Strike 2 Hacks
    231Last post 11y ago
  • How do I get the new UPDATED glow esp hack by merccy? help please!By loix in Counter-Strike 2 Help
    2Last post 11y ago

Tags for this Thread

#c++#csgo#esp#glow#hack#poly