Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 years ago
11 kB
1
Indexable
Never
#include <iostream>
#include <Windows.h>
#include <TlHelp32.h>
#include "Offsets.hpp"
#include <stdint.h>
#include <stdio.h>
#include <string>
#include <thread>
#include "vectors.h"
#include <cmath>
#include <numbers>


using namespace std;
using namespace hazedumper::netvars;
using namespace hazedumper::signatures;

DWORD GetPid() {
	HWND hwP = FindWindowA(NULL, "Counter-Strike: Global Offensive");
	if (!hwP) return 0;
	DWORD ret = 0;
	GetWindowThreadProcessId(hwP, &ret);
	return ret;


}


struct Color
{
	uint8_t r{ }, g{ }, b{ };
};



constexpr const auto enemyColor = Color{ 0, 255, 0 };
constexpr const auto teamcolor = Color{ 0, 0, 0 };



#pragma warning(disable:4996) 

uintptr_t BaseEngine;
uintptr_t BaseDLL;
DWORD procId;
HWND hwnd;
HANDLE hProcess;

string r;
string g;
string b;

// TOGGLES  | develop soon...
bool triggerbotp = false;
bool radarp = false;
bool noFlashp = false;
bool Thp = false;
bool bhp = false;
bool whp = false;
// TOGGLES  | develop soon...


uintptr_t GetBaseDLLAddress(const char* modName) {
	HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, procId);
	if (hSnap != INVALID_HANDLE_VALUE) {
		MODULEENTRY32 modEntry;
		modEntry.dwSize = sizeof(modEntry);	
		if (Module32First(hSnap, &modEntry)) {
			do {
				if (!strcmp(modEntry.szModule, modName)) {
					CloseHandle(hSnap);
					return (uintptr_t)modEntry.modBaseAddr;
				}
			} while (Module32Next(hSnap, &modEntry));
		}
	}
}






template<typename T> T RPM(SIZE_T address) { // Read Proces Memory
	T buffer;
	ReadProcessMemory(hProcess, (LPCVOID)address, &buffer, sizeof(T), NULL);
	return buffer;
}

template<typename T> void WPM(SIZE_T address, T buffer) { // Write Process Memory
	WriteProcessMemory(hProcess, (LPVOID)address, &buffer, sizeof(buffer), NULL);
}


uintptr_t getLocalPlayer() {
	return RPM<uintptr_t>(BaseDLL + dwLocalPlayer);
}


struct glowStructEnemy {
	float red = 1.f;
	float green = 0.f;
	float blue = 0.f;
	float alpha = 1.f;
	uint8_t padding[8];
	float unknown = 1.f;
	uint8_t padding2[4];
	BYTE renderOccluded = true;
	BYTE renderUnoccluded = true;
	BYTE fullBloom = false;
}glowEnm;


struct glowStructLocal {
	float red = 0.f;
	float green = 0.f;
	float blue = 0.f;
	float alpha = 1.f;
	uint8_t padding[8];
	float unknown = 1.f;
	uint8_t padding2[4];
	BYTE renderOccluded = false;
	BYTE renderUnoccluded = false;
	BYTE fullBloom = false;
}glowLocal;






uintptr_t getPlayer(int index) {
	//Each player in the game has an index.
	return RPM< uintptr_t>(BaseDLL + dwEntityList + index * 0x10); // We use index times 0x10 because the distance between each player 0x10.
}

int getTeam(uintptr_t player) {
	return RPM<int>(player + m_iTeamNum);
}

int getCrosshairID(uintptr_t player) {
	return RPM<int>(player + m_iCrosshairId);


}

constexpr Vector3 CalculateAngle(
	const Vector3& localPosition,
	const Vector3& enemyPosition,
	const Vector3& viewAngles) noexcept
{
	return ((enemyPosition - localPosition).ToAngle() - viewAngles);
}

void ExterTi() 
{

	while (!GetAsyncKeyState(VK_END) & 1) // END KEY FOR END PROCESS
	{
		const auto localPlayer = RPM<uintptr_t>(BaseDLL + dwLocalPlayer);

		//Bhop

		uintptr_t buffer;

		

		const auto onGr = RPM<bool>(localPlayer + m_fFlags);
		if (GetAsyncKeyState(VK_SPACE) && onGr & (1 << 0))
		{
			WPM<uintptr_t>(BaseDLL + dwForceJump, 6);

		}
		else {
			WPM<uintptr_t>(BaseDLL + dwForceJump, 4);
		}



		////Bhop *

		const auto dwGlowManager = RPM<uintptr_t>(BaseDLL + dwGlowObjectManager);
		const auto LocalT = RPM<int>(getLocalPlayer() + m_iTeamNum);



		// TPM
		if (GetAsyncKeyState(VK_MBUTTON))
		{
			WPM<int>(localPlayer + m_iObserverMode, 1); // 0-6 types for tpm {0 fp}

		}
		else
		{
			WPM<int>(localPlayer + m_iObserverMode, 0); // 0-6 types for tpm {0 fp}

		}

		//TPM *


		//Anti-FLASH


		WPM<float>(localPlayer + m_flFlashMaxAlpha, 0.f);


		//Anti - FLASH *


		//TriggerBot
		int CrosshairID = getCrosshairID(getLocalPlayer());
		int CrosshairTeam = getTeam(getPlayer(CrosshairID - 1));
		int LocalTeam = getTeam(getLocalPlayer());
		if (CrosshairID > 0 && CrosshairID < 32 && LocalTeam != CrosshairTeam)
		{
			if (GetAsyncKeyState(0x43)) // C key 
			{
				mouse_event(MOUSEEVENTF_LEFTDOWN, NULL, NULL, 0, 0);
				mouse_event(MOUSEEVENTF_LEFTUP, NULL, NULL, 0, 0);
				Sleep(100);
			}
		}
		//TriggerBot *

		//GLOW-ESP 





		const auto locp = RPM<uintptr_t>(BaseDLL + dwLocalPlayer);
		const auto glowobj = RPM<uintptr_t>(BaseDLL + dwGlowObjectManager);

		for (auto i = 0; i < 64; i++) {

			const auto ent = RPM<uintptr_t>(BaseDLL + dwEntityList + i * 0x10);

			bool detect = RPM<bool>(ent + m_bSpotted);




			const auto teamdtc = RPM<int32_t>(ent + m_iTeamNum) == RPM<int32_t>(localPlayer + m_iTeamNum);
			if (!teamdtc)
			{
				WPM<Color>(ent + m_clrRender, enemyColor);

			}


			auto brightness = 25.f;
			const auto _this = static_cast<uintptr_t>(BaseEngine + model_ambient_min - 0x2c);
			WPM<int32_t>(BaseEngine + model_ambient_min, *reinterpret_cast<uintptr_t*>(&brightness) ^ _this);




			// if (!detect) continue;

			const auto glowi = RPM<int32_t>(ent + m_iGlowIndex);

			const auto detectGlows = RPM<uintptr_t>(ent + m_iTeamNum) != RPM<uintptr_t>(locp + m_iTeamNum);

			if (detectGlows)
			{
				WPM<float>(glowobj + (glowi * 0x38) + 0x8, 1.f); // r
				WPM<float>(glowobj + (glowi * 0x38) + 0xC, 0.f); // g
				WPM<float>(glowobj + (glowi * 0x38) + 0x10, 0.f); // b
				WPM<float>(glowobj + (glowi * 0x38) + 0x14, 1.f); // a

				WPM<bool>(glowobj + (glowi * 0x38) + 0x27, true);
				WPM<bool>(glowobj + (glowi * 0x38) + 0x28, true);
			}
			else {
				WPM<float>(glowobj + (glowi * 0x38) + 0x8, 1.f); // r
				WPM<float>(glowobj + (glowi * 0x38) + 0xC, 1.f); // g
				WPM<float>(glowobj + (glowi * 0x38) + 0x10, 1.f); // b
				WPM<float>(glowobj + (glowi * 0x38) + 0x14, 1.f); // a

				WPM<bool>(glowobj + (glowi * 0x38) + 0x27, true);
				WPM<bool>(glowobj + (glowi * 0x38) + 0x28, true);
			}



		}





		//GLOW-ESP *


		// FOV

		WPM<int>(localPlayer + m_iFOV, 100);

		// FOV*


		//Radar
		for (int i = 0; i < 64; i++) {
			DWORD dwCurrentEntity = RPM<DWORD>(BaseDLL + dwEntityList + i * 0x10);
			if (dwCurrentEntity) {
				WPM<bool>(dwCurrentEntity + m_bSpotted, true);
			}
		}
		//Radar *



		// Aimbot



		// aimbot key
		

		// get local playerPointer
		if (!GetAsyncKeyState(VK_RBUTTON) && LocalTeam != dwEntityList) // right button
			continue;

		uintptr_t client = BaseDLL;
		uintptr_t engine = BaseEngine;
		const auto& localplayerPointer = RPM<uintptr_t>(client + dwLocalPlayer);
		const auto& localteamPointer = RPM<int32_t>(localplayerPointer + m_iTeamNum);

		// eye position = origin + viewOffset
		const auto localEyePosition = RPM<Vector3>(localplayerPointer + m_vecOrigin) +
			RPM<Vector3>(localplayerPointer + m_vecViewOffset);

		const auto& clientState = RPM<uintptr_t>(engine + dwClientState);

		const auto& viewAngles = RPM<Vector3>(clientState + dwClientState_ViewAngles);
		const auto& aimPunch = RPM<Vector3>(localplayerPointer + m_aimPunchAngle) * 2;

		// aimbot fov
		auto bestFov = 1.f;
		auto bestAngle = Vector3{ };

		for (auto i = 1; i <= 32; ++i)
		{
			const auto& playerPointer = RPM<uintptr_t>(client + dwEntityList + i * 0x10);

			if (RPM<int32_t>(playerPointer + m_iTeamNum) == localteamPointer)
				continue;

			if (RPM<bool>(playerPointer + m_bDormant))
				continue;

			if (!RPM<int32_t>(playerPointer + m_iHealth))
				continue;

			if (!RPM<bool>(playerPointer + m_bSpottedByMask))
				continue;

			const auto boneMatrix = RPM<uintptr_t>(playerPointer + m_dwBoneMatrix);

			// pof of playerPointer head in 3d space
			const auto playerPointerHeadPosition = Vector3{
				RPM<float>(boneMatrix + 0x30 * 8 + 0x0C),
				RPM<float>(boneMatrix + 0x30 * 8 + 0x1C),
				RPM<float>(boneMatrix + 0x30 * 8 + 0x2C)
			};

			const auto angle = CalculateAngle(
				localEyePosition,
				playerPointerHeadPosition,
				viewAngles + aimPunch
			);

			const auto fov = hypot(angle.x, angle.y);

			if (fov < bestFov)
			{
				bestFov = fov;
				bestAngle = angle;
			}
		}

		// if we have a best angle, do aimbot
		if (!bestAngle.IsZero())
			WPM<Vector3>(clientState + dwClientState_ViewAngles, viewAngles + bestAngle / 20.f); // smoothing




		// Aimbot *

		DWORD ProcesssID2 = GetPid();

		// When csgo closed
		if (!ProcesssID2)
		{
			system("taskkill /IM exterTi.exe /F ");
		}
		else continue;
		// Killing Process*


	}


}





	






int main() {
	DWORD ProcesssID = GetPid();

	

	
	if (!ProcesssID) {

		Sleep(300);
		system("color 4"); // system(color xy) x means backcolor, y means FontColor
		cout << "[-] Please Run csgo and try again!" << endl;
		cout << "\n\n Closing in 1second..." << endl;

		char* msg;
		MessageBox(0, "PLEASE RUN CSGO!", "CSGO IS NOT RUNNING!!", MB_OK | MB_ICONERROR);
		Sleep(200);
		return 0;

	}
	else {
		void passWithColor(); {
			system("color 2"); // system(color xy) x means backcolor, y means FontColor

		}

		
		SetConsoleTitle("ExterTi");
		hwnd = FindWindowA(NULL, "Counter-Strike: Global Offensive");
		GetWindowThreadProcessId(hwnd, &procId);
		BaseDLL = GetBaseDLLAddress("client.dll");
		BaseEngine = GetBaseDLLAddress("engine.dll");

		hProcess = OpenProcess(PROCESS_ALL_ACCESS, NULL, procId);



		cout << "[+] Cheat Activated" << endl;

		cout << "\n" << endl;


		system("color 6");

		cout << "[*] Toggle F6 For Active" << endl;
		cout << "[*] Toggle END For DeActive\n" << endl;
		cout << "[*] BaseClient -> " << hex << BaseDLL << endl;
		cout << "[*] BaseEngine -> " << hex << BaseEngine << endl;

		Sleep(300);

		while (true) 
		{
			if (GetAsyncKeyState(VK_F6))
			{
				const auto LocalP_2 = RPM<int>(BaseDLL + dwLocalPlayer);
				const auto localPlayer = LocalP_2;



				system("cls");
				system("color a");
				const auto detectFOV = RPM<uintptr_t>(LocalP_2 + m_iFOV);

				cout << "\n[+] Active" << endl;
				cout << "\n______________________" << endl;
				
				cout << "[#] Radar: Active" << endl;
				cout << "[#] WallHack: Active" << endl;
				cout << "[#] NoFlash: Active" << endl;
				cout << "[#] TPM: Active" << endl;
				cout << "[#] Bhop: Active" << endl;
				cout << "[#] FOV: Active | " << detectFOV << endl;
				cout << "[!] SkinChanger: NotNow" << endl;

			

				ExterTi();
				system("cls");
				system("color 4");
				WPM<float>(LocalP_2 + m_flFlashMaxAlpha, 255.f);

				cout << "\n[!] Disable" << endl;
				cout << "\n______________________" << endl;

				cout << "[#] Radar: DeActive" << endl;
				cout << "[#] WallHack: DeActive" << endl;
				cout << "[#] NoFlash: DeActive" << endl;
				cout << "[#] TPM: DeActive" << endl;
				cout << "[#] Bhop: DeActive" << endl;
				cout << "[#] FOV: DeActive | "<<detectFOV << endl;
				cout << "[!] SkinChanger: NotNow" << endl;
				




			}
		





			
		
		
		
		
		
		
		
		}







	}
}