Создаем main.cpp туда Пишем : #include windows.h #include <urlmon.h> #include <cstdlib> #include "FindPattern.h" using namespace std::basic_filebuf; #pragma comment(lib, "urlmon.lib") //подключение библиотек затем : int dwGlowObjectManager; int dwlocalPlayer; int dwForceJump; int clientState; int forceAttack; int entityList; int clientAngle; int aimPunch; int glowIndex; int iTeamNum; int vecOrigin; int vecViewOffset; int SpottedByMask; int iHealth; int fFlags; int boneMatrix; int m_flFallbackWear; int m_nFallbackPaintKit; int m_iItemIDHigh; int m_iEntityQuality; int m_iItemDefinitionIndex; int m_hActiveWeapon; int m_hMyWeapons; int CrosshairId; далее byte redGlowFixer[6]; byte greenGlowFixer[6]; byte blueGlowFixer[6]; byte alphaGlowFixer[6]; byte occGlowFixer[4]; void* colorGlowFixerOffset; void* alphaGlowFixerOffset; void* occGlowFixerOffset; #define bDormant 0xED #define PLAYER_ON_FLOOR (1 << 0) #define PLAYER_CROUCHED 0x6 #define M_RADPI 57.295779513082 typedef struct Vector { float x, y, z; }Vector; struct GlowBase { float r; float g; float b; float a; uint8_t unk1[16]; bool m_bRenderWhenOccluded; bool m_bRenderWhenUnoccluded; bool m_bFullBloom; }; struct BoneBase { byte padding[12]; float x; byte padding2[12]; float y; byte padding3[12]; float z; }; struct PlayerStruct { int Team; bool Ignore; bool Dormant; bool Spotted; int Health; int GlowIndex; int Base; Vector Pos; float Angle[3]; float FOV; }; PlayerStruct Players[33]; NBQMemory mem; int key = 0; int key1 = 0; float aimsmooth; int aimfov; DWORD enemyteam; bool showwnd = true; bool isopened; bool isopenedaim; bool isopenedtrigger; bool glowtype; DWORD localPlayer; int localHealth; int lineint = 24; int lasttarget = -2; int Ind = 0; DWORD dwPID = 0; DWORD dwClient = 0; DWORD dwEngine = 0; HANDLE hProcess; DWORD clientbase; #define PI 3.14159265359 float degreesToRadians(float angle_in_degrees) { return angle_in_degrees * (PI / 180.0); } bool EntIsVisible(HANDLE csgo, DWORD ent, DWORD local) { int mask = mem.ReadMemory<int>(csgo, ent + SpottedByMask); int PBASE = mem.ReadMemory<int>(csgo, local + 0x64) - 1; return (mask & (1 << PBASE)) > 0; } float getFOV(float *src, Vector flLocalAngles) { float back[2]; float smoothdiff[2]; float srcangle[2]; srcangle[0] = src[0]; srcangle[1] = src[1]; srcangle[2] = src[2]; srcangle[0] -= flLocalAngles.x; srcangle[1] -= flLocalAngles.y; if (srcangle[0] > 180) srcangle[0] -= 360; if (srcangle[1] > 180) srcangle[1] -= 360; if (srcangle[0] < -180) srcangle[0] += 360; if (srcangle[1] < -180) srcangle[1] += 360; smoothdiff[0] = (srcangle[0]); smoothdiff[1] = (srcangle[1]); back[0] = smoothdiff[0]; back[1] = smoothdiff[1]; if (back[0] > 180) back[0] -= 360; if (back[1] > 180) back[1] -= 360; if (back[0] < -180) back[0] += 360; if (back[1] < -180) back[1] += 360; if (back[0] > 89.0f) back[0] = 89.0f; else if (back[0] < -89.0f) back[0] = -89.0f; if (back[1] > 180.0f) back[1] = 180.0f; else if (back[1] < -180.0f) back[1] = -180.0f; back[2] = 0.f; return back[1]; } потом void entRefresher(HANDLE csgo,DWORD client) { while (true) { localPlayer = mem.ReadMemory<DWORD>(csgo, client + dwlocalPlayer); DWORD localTeam = mem.ReadMemory<DWORD>(csgo, localPlayer + iTeamNum); localHealth = mem.ReadMemory<int>(csgo, localPlayer + iHealth); enemyteam = localTeam == 0x3 ? 0x2 : 0x3; if (isopenedaim) { Players[0].Pos = mem.ReadMemory<Vector>(csgo, localPlayer + vecOrigin); Vector VecView = mem.ReadMemory<Vector>(csgo, localPlayer + vecViewOffset); Players[0].Pos.x += VecView.x; Players[0].Pos.y += VecView.y; Players[0].Pos.z += VecView.z; } if (!localPlayer && !localHealth) continue; for (int i = 1; i < 33; i++) { DWORD player = mem.ReadMemory<int>(csgo, client + entityList + ((i-1) * 0x10)); if (player == 0 && player == localPlayer) { Players.Ignore = true; continue; } else { Players.Ignore = false; } Players.Dormant = mem.ReadMemory<bool>(csgo, player + bDormant); if (Players.Dormant) { Players.Ignore = true; continue; } else { Players.Ignore = false; } DWORD playerteam = mem.ReadMemory<DWORD>(csgo, player + iTeamNum); Players.Team = playerteam; if (playerteam == localTeam) { Players.Ignore = true; continue; } else { Players.Ignore = false; } Players.Ignore = false; Players.Base = player; if (isopenedaim) { DWORD playerbonemtrix = mem.ReadMemory<DWORD>(csgo, player + boneMatrix); BoneBase temp = mem.ReadMemory<BoneBase>(csgo, (playerbonemtrix + (0x30 * 8))); Players.Pos.x = temp.x; Players.Pos.y = temp.y; Players.Pos.z = temp.z; Players.Spotted = EntIsVisible(csgo, player, localPlayer); } Players.Health = mem.ReadMemory<int>(csgo, player + iHealth); Players.GlowIndex = mem.ReadMemory<int>(csgo, player + glowIndex); } std::this_thread::sleep_for(std::chrono::milliseconds(5)); } } float scrToWorld(float X, float Y, float Z, float eX, float eY, float eZ) { return(sqrtf((eX - X) * (eX - X) + (eY - Y) * (eY - Y) + (eZ - Z) * (eZ - Z))); } void CalcAngle(Vector src, Vector dst, float *angles) { float Delta[3] = { (src.x - dst.x), (src.y - dst.y), (src.z - dst.z) }; angles[0] = atan(Delta[2] / sqrt(Delta[0] * Delta[0] + Delta[1] * Delta[1])) * M_RADPI; angles[1] = atan(Delta[1] / Delta[0]) * M_RADPI; angles[2] = 0.0f; if (Delta[0] >= 0.0) angles[1] += 180.0f; } float CloseEnt() { float fLowest = 1000000, TMP; int iIndex = -1; Vector localAngles = mem.ReadMemory<Vector>(hProcess, clientbase + clientAngle); for (int i = 1; i < 33; i++) { TMP = scrToWorld(Players[0].Pos.x, Players[0].Pos.y, Players[0].Pos.z, Players.Pos.x, Players.Pos.y, Players.Pos.z); CalcAngle(Players[0].Pos, Players.Pos, Players.Angle); Players.FOV = abs(getFOV(Players.Angle, localAngles)); if (TMP < fLowest && !Players.Ignore && Players.Base != localPlayer && Players.Health > 0 && Players.Spotted && Players.FOV < aimfov) { fLowest = TMP; iIndex = i; } } return iIndex; } float AngleDifference(float* ViewAngles, float* TargetAngles, float Distance) { float pitch = sin(degreesToRadians(ViewAngles[0] - TargetAngles[0])); float yaw = sin(degreesToRadians(ViewAngles[1] - TargetAngles[1])); return sqrt(powf(pitch, 2.0) + powf(yaw, 2.0)); } void retryAim(HANDLE csgo, DWORD client, DWORD engine) { isopenedaim = true; while (true) { if (isopenedaim && localPlayer && localHealth) { std::this_thread::sleep_for(std::chrono::milliseconds(2)); static Vector oldAimPunch; static Vector fixedAngle; if (GetAsyncKeyState(key1) & 0x8000) { Ind = CloseEnt(); if (Players[lasttarget].Spotted && (Players[lasttarget].Team == enemyteam) && !Players[lasttarget].Dormant && Players[lasttarget].Health > 0) { Ind = lasttarget; } if (Ind != -1) { float smoothed[2]; Vector aimpunch = mem.ReadMemory<Vector>(csgo, localPlayer + aimPunch); aimpunch.x = aimpunch.x * 2.f; aimpunch.y = aimpunch.y * 2.f; Vector localAngles = mem.ReadMemory<Vector>(csgo, clientbase + clientAngle); CalcAngle(Players[0].Pos, Players[Ind].Pos, Players[Ind].Angle); Smooth(aimpunch.x, aimpunch.y, Players[Ind].Angle, smoothed, localAngles, aimsmooth); mem.WriteMemory<float>(csgo, clientbase + clientAngle, smoothed[0]); mem.WriteMemory<float>(csgo, clientbase + clientAngle + 0x4, smoothed[1]); lasttarget = Ind; } } } std::this_thread::sleep_for(std::chrono::milliseconds(10)); } } void glowPlayer(HANDLE csgo, DWORD client, GlowBase entity, DWORD entityadr, int Health) { entity.r = 1.f - (float)(Health / 100.f); entity.g = (float)(Health / 100.f); entity.b = 0.f; entity.a = 1.f; entity.m_bRenderWhenOccluded = true; mem.WriteMemory<GlowBase>(csgo, entityadr + 0x4, entity); } void FixedGlowPlayer(HANDLE csgo, DWORD client, GlowBase entity, DWORD entityadr) { entity.r = 1.f; entity.g = 0.f; entity.b = 0.f; entity.a = 1.f; entity.m_bRenderWhenOccluded = true; mem.WriteMemory<GlowBase>(csgo, entityadr + 0x4, entity); } void FixedGlowPlayerClose(HANDLE csgo, DWORD client, GlowBase entity, DWORD entityadr) { entity.r = 0.f; entity.g = 0.f; entity.b = 0.f; entity.a = 0.f; entity.m_bRenderWhenOccluded = false; mem.WriteMemory<GlowBase>(csgo, entityadr + 0x4, entity); } void recover() { WriteProcessMemory(hProcess, (LPVOID)colorGlowFixerOffset, &redGlowFixer, sizeof(redGlowFixer), NULL); WriteProcessMemory(hProcess, (LPVOID)((DWORD)colorGlowFixerOffset + 11), &greenGlowFixer, sizeof(greenGlowFixer), NULL); WriteProcessMemory(hProcess, (LPVOID)((DWORD)colorGlowFixerOffset + 22), &blueGlowFixer, sizeof(blueGlowFixer), NULL); WriteProcessMemory(hProcess, (LPVOID)((DWORD)alphaGlowFixerOffset), &alphaGlowFixer, sizeof(alphaGlowFixer), NULL); WriteProcessMemory(hProcess, (LPVOID)((DWORD)occGlowFixerOffset), &occGlowFixer, sizeof(occGlowFixer), NULL); } HWND hWnd; void retryHotkeys(HANDLE csgo, DWORD client) { isopened = true; while (true) { if (GetAsyncKeyState(VK_NUMPAD8) & 0x8000) { isopened = !isopened; if (isopened) { COORD coord; coord.X = 0; coord.Y = lineint; lineint++; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); byte cleaner[6]; std::fill(cleaner, cleaner + sizeof(cleaner), 144); byte cleaner4[4]; std::fill(cleaner4, cleaner4 + sizeof(cleaner4), 144); WriteProcessMemory(csgo, (LPVOID)colorGlowFixerOffset, &cleaner, sizeof(cleaner), NULL); WriteProcessMemory(csgo, (LPVOID)((DWORD)colorGlowFixerOffset + 11), &cleaner, sizeof(cleaner), NULL); WriteProcessMemory(csgo, (LPVOID)((DWORD)colorGlowFixerOffset + 22), &cleaner, sizeof(cleaner), NULL); WriteProcessMemory(csgo, (LPVOID)((DWORD)alphaGlowFixerOffset), &cleaner, sizeof(cleaner), NULL); WriteProcessMemory(csgo, (LPVOID)((DWORD)occGlowFixerOffset), &cleaner4, sizeof(cleaner4), NULL); } else { COORD coord; coord.X = 0; coord.Y = lineint; lineint++; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); WriteProcessMemory(csgo, (LPVOID)colorGlowFixerOffset, &redGlowFixer, sizeof(redGlowFixer), NULL); WriteProcessMemory(csgo, (LPVOID)((DWORD)colorGlowFixerOffset + 11), &greenGlowFixer, sizeof(greenGlowFixer), NULL); WriteProcessMemory(csgo, (LPVOID)((DWORD)colorGlowFixerOffset + 22), &blueGlowFixer, sizeof(blueGlowFixer), NULL); WriteProcessMemory(csgo, (LPVOID)((DWORD)alphaGlowFixerOffset), &alphaGlowFixer, sizeof(alphaGlowFixer), NULL); WriteProcessMemory(csgo, (LPVOID)((DWORD)occGlowFixerOffset), &occGlowFixer, sizeof(occGlowFixer), NULL); } std::this_thread::sleep_for(std::chrono::milliseconds(200)); } if ((GetAsyncKeyState(VK_NUMPAD4) & 0x8000) || (GetAsyncKeyState(VK_END) & 0x8000)) { exit(0); } if (GetAsyncKeyState(VK_NUMPAD5) & 0x8000) { if (showwnd) { hWnd = GetConsoleWindow(); ShowWindow(hWnd, SW_HIDE); showwnd = false; } else { hWnd = GetConsoleWindow(); ShowWindow(hWnd, SW_SHOW); showwnd = true; } std::this_thread::sleep_for(std::chrono::milliseconds(200)); } std::this_thread::sleep_for(std::chrono::milliseconds(100)); } } затем void retryGlowFixed(HANDLE csgo, DWORD client) { while (true) { if (isopened && localPlayer) { DWORD GlowObject = mem.ReadMemory<DWORD>(csgo, client + dwGlowObjectManager); for (int i = 1; i < 33; i++) { if (Players.Team != enemyteam) { GlowBase entity = mem.ReadMemory<GlowBase>(csgo, GlowObject + ((Players.GlowIndex) * 0x38) + 0x4); DWORD entityadr = GlowObject + ((Players.GlowIndex) * 0x38); FixedGlowPlayerClose(csgo, client, entity, entityadr); } } for (int i = 1; i < 33; i++) { if (!Players.Ignore) { GlowBase entity = mem.ReadMemory<GlowBase>(csgo, GlowObject + ((Players.GlowIndex) * 0x38) + 0x4); DWORD entityadr = GlowObject + ((Players.GlowIndex) * 0x38); FixedGlowPlayer(csgo, client, entity, entityadr); } } } std::this_thread::sleep_for(std::chrono::milliseconds(1000)); } } void retryGlow(HANDLE csgo, DWORD client) { while (true) { if (isopened) { DWORD GlowObject = mem.ReadMemory<DWORD>(csgo, client + dwGlowObjectManager); for (int i = 1; i < 33; i++) { if (!Players.Ignore) { GlowBase entity = mem.ReadMemory<GlowBase>(csgo, GlowObject + ((Players.GlowIndex) * 0x38) + 0x4); DWORD entityadr = GlowObject + ((Players.GlowIndex) * 0x38); glowPlayer(csgo, client, entity, entityadr, Players.Health); } } } std::this_thread::sleep_for(std::chrono::milliseconds(100)); } } BOOL WINAPI ConsoleHandler(DWORD dwType) { switch (dwType) { case CTRL_CLOSE_EVENT: case CTRL_LOGOFF_EVENT: case CTRL_SHUTDOWN_EVENT: recover(); Sleep(1000); return TRUE; default: break; } return FALSE; } bool catched = false; bool catchedfov = false; bool catchedglow = false; bool repeat = false; bool repeatfov = false; bool repeatglow = false; std::string input1; HWND console = GetConsoleWindow(); RECT r; fseek(infile, 0, SEEK_END); long filesize = ftell(infile); char* buf = new char[filesize + 1]; fseek(infile, 0, SEEK_SET); fread(buf, 1, filesize, infile); fclose(infile); buf[filesize] = '\0'; std::stringstream ss; ss.str(buf); delete[] buf; Json::Value netvars; ss >> netvars; MoveWindow(console, r.left, r.top, 650, 500, TRUE); SetConsoleTitle(title); _setmode(_fileno(stdout), _O_U16TEXT); dwGlowObjectManager = netvars["signatures"]["dwGlowObjectManager"].asInt(); dwlocalPlayer = netvars["signatures"]["dwLocalPlayer"].asInt(); dwForceJump = netvars["signatures"]["dwForceJump"].asInt(); clientState = netvars["signatures"]["dwClientState"].asInt(); forceAttack = netvars["signatures"]["dwForceAttack"].asInt(); entityList = netvars["signatures"]["dwEntityList"].asInt(); glowIndex = netvars["netvars"]["m_iGlowIndex"].asInt(); iTeamNum = netvars["netvars"]["m_iTeamNum"].asInt(); vecOrigin = netvars["netvars"]["m_vecOrigin"].asInt(); vecViewOffset = netvars["netvars"]["m_vecViewOffset"].asInt(); SpottedByMask = netvars["netvars"]["m_bSpottedByMask"].asInt(); iHealth = netvars["netvars"]["m_iHealth"].asInt(); fFlags = netvars["netvars"]["m_fFlags"].asInt(); boneMatrix = netvars["netvars"]["m_dwBoneMatrix"].asInt(); m_flFallbackWear = netvars["netvars"]["m_flFallbackWear"].asInt(); m_nFallbackPaintKit = netvars["netvars"]["m_nFallbackPaintKit"].asInt(); m_iItemIDHigh = netvars["netvars"]["m_iItemIDHigh"].asInt(); m_iEntityQuality = netvars["netvars"]["m_iEntityQuality"].asInt(); m_iItemDefinitionIndex = netvars["netvars"]["m_iItemDefinitionIndex"].asInt(); m_hActiveWeapon = netvars["netvars"]["m_hActiveWeapon"].asInt(); m_hMyWeapons = netvars["netvars"]["m_hMyWeapons"].asInt(); _setmode(_fileno(stdout), _O_U16TEXT); // ищем процесс do { dwPID = mem.GetProcessIdByProcessName("csgo.exe"); Sleep(100); } while (!dwPID); // ищем client_panorama.dll do { dwClient = mem.GetModuleBaseAddress(dwPID, "client_panorama.dll"); Sleep(100); } while (!dwClient); // ищем engine.dll do { dwEngine = mem.GetModuleBaseAddress(dwPID, "engine.dll"); Sleep(100); } while (!dwEngine); hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPID); clientbase = mem.ReadMemory<DWORD>(hProcess, dwEngine + clientState); colorGlowFixerOffset = PatternScanExModule(hProcess, mem.GetModule(dwPID, "client_panorama.dll"), (wchar_t*)"csgo.exe", (wchar_t*)"client_panorama.dll", (char*)"\xF3\x0F\x11\x44\xC8\x00\xF3\x0F\x10\x45\x00\xF3\x0F\x11\x44\xC8\x00\xF3\x0F\x10\x45\x00\xF3\x0F\x11\x44\xC8\x00", (char*)"xxxxx?xxxx?xxxxx?xxxx?xxxxx?"); alphaGlowFixerOffset = PatternScanExModule(hProcess, mem.GetModule(dwPID, "client_panorama.dll"), (wchar_t*)"csgo.exe", (wchar_t*)"client_panorama.dll", (char*)"\xF3\x0F\x11\x44\xC8\x00\x5F\x5E\x5B\x8B\xE5\x5D", (char*)"xxxxx?xxxxxx"); occGlowFixerOffset = PatternScanExModule(hProcess, mem.GetModule(dwPID, "client_panorama.dll"), (wchar_t*)"csgo.exe", (wchar_t*)"client_panorama.dll", (char*)"\x88\x5C\xD1\x24\x8B\x00\x8B\x5D\xF4", (char*)"xxxxxxxxx"); ReadProcessMemory(hProcess, colorGlowFixerOffset, redGlowFixer, sizeof(redGlowFixer), 0); ReadProcessMemory(hProcess, alphaGlowFixerOffset, alphaGlowFixer, sizeof(alphaGlowFixer), 0); ReadProcessMemory(hProcess, occGlowFixerOffset, occGlowFixer, sizeof(occGlowFixer), 0); ReadProcessMemory(hProcess, (LPVOID)((DWORD)colorGlowFixerOffset + 11), greenGlowFixer, sizeof(greenGlowFixer), 0); ReadProcessMemory(hProcess, (LPVOID)((DWORD)colorGlowFixerOffset + 22), blueGlowFixer, sizeof(blueGlowFixer), 0); system("cls"); FILE* infile1 = fopen("Yougame.json", "r"); if (infile1 != NULL) { fseek(infile1, 0, SEEK_END); long filesize1 = ftell(infile1); char* buf1 = new char[filesize1 + 1]; fseek(infile1, 0, SEEK_SET); fread(buf1, 1, filesize1, infile1); fclose(infile1); buf1[filesize1] = '\0'; std::stringstream ss1; ss1.str(buf1); delete[] buf1; // удачи тебе ;) }