[
  {
    "path": ".gitattributes",
    "content": "# Auto detect text files and perform LF normalization\n* text=auto\n"
  },
  {
    "path": "CSGO-Aimbot/Source.cpp",
    "content": "#include <iostream>\n#include <Windows.h>\n#include <TlHelp32.h>\n#include \"Offsets.h\"\n\n#define dwLocalPlayer 0xD30B94\n#define dwEntityList 0x4D44A24\n#define m_dwBoneMatrix 0x26A8\n#define m_iTeamNum 0xF4\n#define m_iHealth 0x100\n#define m_vecOrigin 0x138\n#define m_bDormant 0xED\n\nconst int SCREEN_WIDTH = GetSystemMetrics(SM_CXSCREEN); const int xhairx = SCREEN_WIDTH / 2;\nconst int SCREEN_HEIGHT = GetSystemMetrics(SM_CYSCREEN); const int xhairy = SCREEN_HEIGHT / 2;\n\nHWND hwnd;\nDWORD procId; \nHANDLE hProcess; \nuintptr_t moduleBase; \nHDC hdc;\nint closest; //Used in a thread to save CPU usage.\n\nuintptr_t GetModuleBaseAddress(const char* modName) {\n\tHANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, procId);\n\tif (hSnap != INVALID_HANDLE_VALUE) {\n\t\tMODULEENTRY32 modEntry;\n\t\tmodEntry.dwSize = sizeof(modEntry);\n\t\tif (Module32First(hSnap, &modEntry)) {\n\t\t\tdo {\n\t\t\t\tif (!strcmp(modEntry.szModule, modName)) {\n\t\t\t\t\tCloseHandle(hSnap);\n\t\t\t\t\treturn (uintptr_t)modEntry.modBaseAddr;\n\t\t\t\t}\n\t\t\t} while (Module32Next(hSnap, &modEntry));\n\t\t}\n\t}\n}\n\ntemplate<typename T> T RPM(SIZE_T address) {\n\tT buffer;\n\tReadProcessMemory(hProcess, (LPCVOID)address, &buffer, sizeof(T), NULL);\n\treturn buffer;\n}\n\nclass Vector3 {\npublic:\n\tfloat x, y, z;\n\tVector3() : x(0.f), y(0.f), z(0.f) {}\n\tVector3(float _x, float _y, float _z) : x(_x), y(_y), z(_z) {}\n};\n\n\nint getTeam(uintptr_t player) { \n\treturn RPM<int>(player + m_iTeamNum);\n}\n\nuintptr_t GetLocalPlayer() {\n\treturn RPM< uintptr_t>(moduleBase + dwLocalPlayer);\n}\n\nuintptr_t GetPlayer(int index) {  //Each player has an index. 1-64\n\treturn RPM< uintptr_t>(moduleBase + dwEntityList + index * 0x10); //We multiply the index by 0x10 to select the player we want in the entity list.\n}\n\nint GetPlayerHealth(uintptr_t player) { \n\treturn RPM<int>(player + m_iHealth);\n}\n\nVector3 PlayerLocation(uintptr_t player) { //Stores XYZ coordinates in a Vector3.\n\treturn RPM<Vector3>(player + m_vecOrigin);\n}\n\nbool DormantCheck(uintptr_t player) {\n\treturn RPM<int>(player + m_bDormant);\n}\n\nVector3 get_head(uintptr_t player) { \n\tstruct boneMatrix_t {\n\t\tbyte pad3[12];\n\t\tfloat x;\n\t\tbyte pad1[12];\n\t\tfloat y;\n\t\tbyte pad2[12];\n\t\tfloat z;\n\t};\n\tuintptr_t boneBase = RPM<uintptr_t>(player + m_dwBoneMatrix);\n\tboneMatrix_t boneMatrix = RPM<boneMatrix_t>(boneBase + (sizeof(boneMatrix) * 8 /*8 is the boneid for head*/));\n\treturn Vector3(boneMatrix.x, boneMatrix.y, boneMatrix.z);\n}\n\nstruct view_matrix_t {\n\tfloat matrix[16]; \n} vm;\n\nstruct Vector3 WorldToScreen(const struct Vector3 pos, struct view_matrix_t matrix) { //This turns 3D coordinates (ex: XYZ) int 2D coordinates (ex: XY).\n\tstruct Vector3 out;\n\tfloat _x = matrix.matrix[0] * pos.x + matrix.matrix[1] * pos.y + matrix.matrix[2] * pos.z + matrix.matrix[3];\n\tfloat _y = matrix.matrix[4] * pos.x + matrix.matrix[5] * pos.y + matrix.matrix[6] * pos.z + matrix.matrix[7];\n\tout.z = matrix.matrix[12] * pos.x + matrix.matrix[13] * pos.y + matrix.matrix[14] * pos.z + matrix.matrix[15];\n\n\t_x *= 1.f / out.z;\n\t_y *= 1.f / out.z;\n\n\tout.x = SCREEN_WIDTH * .5f; \n\tout.y = SCREEN_HEIGHT * .5f;\n\n\tout.x += 0.5f * _x * SCREEN_WIDTH + 0.5f;\n\tout.y -= 0.5f * _y * SCREEN_HEIGHT + 0.5f;\n\n\treturn out;\n}\n\nfloat pythag(int x1, int y1, int x2, int y2) {\n\treturn sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));\n}\n\nint FindClosestEnemy() {\n\tfloat Finish;\n\tint ClosestEntity = 1;\n\tVector3 Calc = { 0, 0, 0 };\n\tfloat Closest = FLT_MAX;\n\tint localTeam = getTeam(GetLocalPlayer()); \n\tfor (int i = 1; i < 64; i++) { //Loops through all the entitys in the index 1-64.\n\t\tDWORD Entity = GetPlayer(i); \n\t\tint EnmTeam = getTeam(Entity); if (EnmTeam == localTeam) continue; \n\t\tint EnmHealth = GetPlayerHealth(Entity); if (EnmHealth < 1 || EnmHealth > 100) continue;\n\t\tint Dormant = DormantCheck(Entity); if (Dormant) continue; \n\t\tVector3 headBone = WorldToScreen(get_head(Entity), vm); \n\t\tFinish = pythag(headBone.x, headBone.y, xhairx, xhairy);\n\t\tif (Finish < Closest) {\n\t\t\tClosest = Finish;\n\t\t\tClosestEntity = i; \n\t\t}\n\t}\n\n\treturn ClosestEntity;\n}\n\nvoid DrawLine(float StartX, float StartY, float EndX, float EndY) { //This function is optional for debugging.\n\tint a, b = 0;\n\tHPEN hOPen;\n\tHPEN hNPen = CreatePen(PS_SOLID, 2, 0x0000FF /*red*/);\n\thOPen = (HPEN)SelectObject(hdc, hNPen);\n\tMoveToEx(hdc, StartX, StartY, NULL); //start of line\n\ta = LineTo(hdc, EndX, EndY); //end of line\n\tDeleteObject(SelectObject(hdc, hOPen));\n} \n\nvoid FindClosestEnemyThread() { \n\twhile (1) {\n\t\tclosest = FindClosestEnemy();\n\t}\n}\n\nint main() {\n\thwnd = FindWindowA(NULL, \"Counter-Strike: Global Offensive\");\n\tGetWindowThreadProcessId(hwnd, &procId); \n\tmoduleBase = GetModuleBaseAddress(\"client.dll\"); \n\thProcess = OpenProcess(PROCESS_ALL_ACCESS, NULL, procId); \n\thdc = GetDC(hwnd);\n\tCreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)FindClosestEnemyThread, NULL, NULL, NULL); \n\n\twhile (!GetAsyncKeyState(VK_END)) { //press the \"end\" key to end the hack\n\t\tvm = RPM<view_matrix_t>(moduleBase + dwViewMatrix);\n\t\tVector3 closestw2shead = WorldToScreen(get_head(GetPlayer(closest)), vm); \n\t\tDrawLine(xhairx, xhairy, closestw2shead.x, closestw2shead.y); //optinal for debugging\n\n\t\tif (GetAsyncKeyState(VK_MENU /*alt key*/) && closestw2shead.z >= 0.001f /*onscreen check*/)\n\t\t\tSetCursorPos(closestw2shead.x, closestw2shead.y); //turn off \"raw input\" in CSGO settings\n\t}\n}\n"
  },
  {
    "path": "CSGO-Bunnyhop/Source.cpp",
    "content": "#include <iostream>\n#include <Windows.h>\n#include <TlHelp32.h>\n\n#define dwEntityList 0x4D3C7BC\n#define dwForceJump 0x51E0004\n#define m_fFlags 0x104\n\nuintptr_t moduleBase;\nDWORD procId;\nHWND hwnd;\nHANDLE hProcess;\n\nuintptr_t GetModuleBaseAddress(const char* modName) {\n\tHANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, procId);\n\tif (hSnap != INVALID_HANDLE_VALUE) {\n\t\tMODULEENTRY32 modEntry;\n\t\tmodEntry.dwSize = sizeof(modEntry);\n\t\tif (Module32First(hSnap, &modEntry)) {\n\t\t\tdo {\n\t\t\t\tif (!strcmp(modEntry.szModule, modName)) {\n\t\t\t\t\tCloseHandle(hSnap);\n\t\t\t\t\treturn (uintptr_t)modEntry.modBaseAddr;\n\t\t\t\t}\n\t\t\t} while (Module32Next(hSnap, &modEntry));\n\t\t}\n\t}\n}\n\ntemplate<typename T> T RPM(SIZE_T address) {\n\tT buffer;\n\tReadProcessMemory(hProcess, (LPCVOID)address, &buffer, sizeof(T), NULL);\n\treturn buffer;\n}\n\ntemplate<typename T> void WPM(SIZE_T address, T buffer) {\n\tWriteProcessMemory(hProcess, (LPVOID)address, &buffer, sizeof(buffer), NULL);\n}\n\nint main() {\n\thwnd = FindWindowA(NULL, \"Counter-Strike: Global Offensive\");\n\tGetWindowThreadProcessId(hwnd, &procId);\n\tmoduleBase = GetModuleBaseAddress(\"client.dll\");\n\thProcess = OpenProcess(PROCESS_ALL_ACCESS, NULL, procId);\n\tuintptr_t buffer;\n\n\twhile (!GetAsyncKeyState(VK_END))\n\t{\n\t\tuintptr_t localPlayer = RPM<uintptr_t>(moduleBase + dwEntityList);\n\t\tint flags = RPM<int>(localPlayer + m_fFlags);\n\t\tif (flags & 1) {\n\t\t\tbuffer = 5;\n\t\t}\n\t\telse {\n\t\t\tbuffer = 4;\n\t\t}\n\n\t\tif (GetAsyncKeyState(VK_SPACE) & 0x8000) {\n\t\t\tWPM(moduleBase + dwForceJump, buffer);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "CSGO-FOV/Source.cpp",
    "content": "#include <iostream>\n#include <Windows.h>\n#include <TlHelp32.h>\n\n#define dwEntityList 0x4D42A34\n#define m_iDefaultFOV  0x332C\n\nuintptr_t moduleBase;\nDWORD procId;\nHWND hwnd;\nHANDLE hProcess;\n\nuintptr_t GetModuleBaseAddress(const char* modName) {\n\tHANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, procId);\n\tif (hSnap != INVALID_HANDLE_VALUE) {\n\t\tMODULEENTRY32 modEntry;\n\t\tmodEntry.dwSize = sizeof(modEntry);\n\t\tif (Module32First(hSnap, &modEntry)) {\n\t\t\tdo {\n\t\t\t\tif (!strcmp(modEntry.szModule, modName)) {\n\t\t\t\t\tCloseHandle(hSnap);\n\t\t\t\t\treturn (uintptr_t)modEntry.modBaseAddr;\n\t\t\t\t}\n\t\t\t} while (Module32Next(hSnap, &modEntry));\n\t\t}\n\t}\n}\n\ntemplate<typename T> T RPM(SIZE_T address) {\n\tT buffer;\n\tReadProcessMemory(hProcess, (LPCVOID)address, &buffer, sizeof(T), NULL);\n\treturn buffer;\n}\n\ntemplate<typename T> void WPM(SIZE_T address, T buffer) {\n\tWriteProcessMemory(hProcess, (LPVOID)address, &buffer, sizeof(buffer), NULL);\n}\n\nvoid main() {\n\thwnd = FindWindowA(NULL, \"Counter-Strike: Global Offensive\");\n\tGetWindowThreadProcessId(hwnd, &procId);\n\tmoduleBase = GetModuleBaseAddress(\"client.dll\");\n\thProcess = OpenProcess(PROCESS_ALL_ACCESS, NULL, procId);\n\tint fov = 90;\n\n\twhile (!GetAsyncKeyState(VK_END))\n\t{\n\t\tuintptr_t localPlayer = RPM<uintptr_t>(moduleBase + dwEntityList);\n\t\tint iFOV = RPM<int>(localPlayer + m_iDefaultFOV);\n\t\tstd::cout << \"FOV: \" << iFOV << std::endl;\n\n\t\tif (GetAsyncKeyState(0x76 /*F7*/) & 1)\n\t\t{\n\t\t\t//minus\n\t\t\tfov = fov - 1;\n\t\t\tWPM<int>(localPlayer + m_iDefaultFOV, fov);\n\t\t}\n\n\t\tif (GetAsyncKeyState(0x77 /*F8*/) & 1)\n\t\t{\n\t\t\t//add\n\t\t\tfov = fov + 1;\n\t\t\tWPM<int>(localPlayer + m_iDefaultFOV, fov);\n\t\t}\n\n\t\tif (GetAsyncKeyState(0x78 /*F9*/) & 1)\n\t\t{\n\t\t\t//resets\n\t\t\tfov = 90;\n\t\t\tWPM<int>(localPlayer + m_iDefaultFOV, fov);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "CSGO-GDI-ESP/Source.cpp",
    "content": "#include <Windows.h>\n#include <TlHelp32.h>\n \n#define dwEntityList 0x4D3C5FC\n#define dwViewMatrix 0x4D2E014\n#define m_iTeamNum 0xF4\n#define m_iHealth 0x100\n#define m_vecOrigin 0x138\n \nuintptr_t moduleBase;\nHANDLE TargetProcess;\nHPEN BoxPen = CreatePen(PS_SOLID, 1, RGB(255, 0, 0));\nRECT WBounds;\nHWND EspHWND;\n \ntemplate<typename T> T RPM(SIZE_T address) {\n    T buffer;\n    ReadProcessMemory(TargetProcess, (LPCVOID)address, &buffer, sizeof(T), NULL);\n    return buffer;\n}\n \nuintptr_t GetModuleBaseAddress(DWORD dwPid, const char* moduleName) {\n    uintptr_t dwBase = 0;\n    do {\n        HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, dwPid);\n        if (hSnapshot == INVALID_HANDLE_VALUE) { continue; }\n        MODULEENTRY32 ModuleEntry32;\n        ModuleEntry32.dwSize = sizeof(MODULEENTRY32);\n        if (Module32First(hSnapshot, &ModuleEntry32)) {\n            do {\n                if (!strcmp(ModuleEntry32.szModule, (LPSTR)moduleName)) {\n                    dwBase = (DWORD)ModuleEntry32.modBaseAddr;\n                    break;\n                }\n            } while (Module32Next(hSnapshot, &ModuleEntry32));\n        }\n        CloseHandle(hSnapshot);\n    } while (!dwBase);\n    return dwBase;\n}\n \nstruct Vector3 {\n    float x, y, z;\n};\n \nstruct view_matrix_t {\n    float matrix[16];\n};\n \nstruct Vector3 WorldToScreen(const struct Vector3 pos, struct view_matrix_t matrix) {\n    struct Vector3 out;\n    float _x = matrix.matrix[0] * pos.x + matrix.matrix[1] * pos.y + matrix.matrix[2] * pos.z + matrix.matrix[3];\n    float _y = matrix.matrix[4] * pos.x + matrix.matrix[5] * pos.y + matrix.matrix[6] * pos.z + matrix.matrix[7];\n    out.z = matrix.matrix[12] * pos.x + matrix.matrix[13] * pos.y + matrix.matrix[14] * pos.z + matrix.matrix[15];\n \n    _x *= 1.f / out.z;\n    _y *= 1.f / out.z;\n \n    int width = WBounds.right - WBounds.left;\n    int height = WBounds.bottom + WBounds.left;\n \n    out.x = width * .5f;\n    out.y = height * .5f;\n \n    out.x += 0.5f * _x * width + 0.5f;\n    out.y -= 0.5f * _y * height + 0.5f;\n \n    return out;\n}\n \nvoid Draw(HDC hdc, Vector3 foot, Vector3 head) {\n    float height = head.y - foot.y;\n    float width = height / 2.4f;\n    SelectObject(hdc, BoxPen);\n    Rectangle(hdc, foot.x - (width / 2), foot.y, head.x + (width / 2), head.y);\n}\n \nLRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {\n    switch (msg) {\n    case WM_PAINT: {\n        PAINTSTRUCT ps;\n        HDC Memhdc;\n        HDC hdc;\n        HBITMAP Membitmap;\n \n        int win_width = WBounds.right - WBounds.left;\n        int win_height = WBounds.bottom + WBounds.left;\n \n        hdc = BeginPaint(hwnd, &ps);\n        Memhdc = CreateCompatibleDC(hdc);\n        Membitmap = CreateCompatibleBitmap(hdc, win_width, win_height);\n        SelectObject(Memhdc, Membitmap);\n        FillRect(Memhdc, &WBounds, WHITE_BRUSH);\n \n        view_matrix_t vm = RPM<view_matrix_t>(moduleBase + dwViewMatrix);\n        int localteam = RPM<int>(RPM<DWORD>(moduleBase + dwEntityList) + m_iTeamNum);\n \n        for (int i = 1; i < 64; i++) {\n            uintptr_t pEnt = RPM<DWORD>(moduleBase + dwEntityList + (i * 0x10));\n            int team = RPM<int>(pEnt + m_iTeamNum);\n \n            if (team != localteam) {\n                int health = RPM<int>(pEnt + m_iHealth);\n                Vector3 pos = RPM<Vector3>(pEnt + m_vecOrigin);\n                Vector3 head; head.x = pos.x; head.y = pos.y; head.z = pos.z + 72.f;\n                Vector3 screenpos = WorldToScreen(pos, vm);\n                Vector3 screenhead = WorldToScreen(head, vm);\n                float height = screenhead.y - screenpos.y;\n                float width = height / 2.4f;\n \n                if (screenpos.z >= 0.01f && health > 0 && health < 101) {\n                    Draw(Memhdc, screenpos, screenhead);\n                }\n            }\n        }\n        BitBlt(hdc, 0, 0, win_width, win_height, Memhdc, 0, 0, SRCCOPY);\n        DeleteObject(Membitmap);\n        DeleteDC(Memhdc);\n        DeleteDC(hdc);\n        EndPaint(hwnd, &ps);\n        ValidateRect(hwnd, &WBounds);\n    }\n    case WM_ERASEBKGND:\n        return 1;\n    case WM_CLOSE:\n        DestroyWindow(hwnd);\n        break;\n    case WM_DESTROY:\n        PostQuitMessage(0);\n        break;\n    default:\n        return DefWindowProc(hwnd, msg, wParam, lParam);\n    }\n    return 0;\n}\n \nDWORD WorkLoop() {\n    while (1) {\n        InvalidateRect(EspHWND, &WBounds, true);\n        Sleep(16); //16 ms * 60 fps ~ 1000 ms\n    }\n}\n \nint main() {\n    HWND GameHWND = FindWindowA(0, \"Counter-Strike: Global Offensive\");\n    GetClientRect(GameHWND, &WBounds);\n    DWORD dwPid; GetWindowThreadProcessId(GameHWND, &dwPid);\n    TargetProcess = OpenProcess(PROCESS_ALL_ACCESS, NULL, dwPid);\n    moduleBase = GetModuleBaseAddress(dwPid, \"client_panorama.dll\");\n \n    WNDCLASSEX WClass;\n    MSG Msg;\n    WClass.cbSize = sizeof(WNDCLASSEX);\n    WClass.style = NULL;\n    WClass.lpfnWndProc = WndProc;\n    WClass.cbClsExtra = NULL;\n    WClass.cbWndExtra = NULL;\n    WClass.hInstance = reinterpret_cast<HINSTANCE>(GetWindowLongA(GameHWND, GWL_HINSTANCE));\n    WClass.hIcon = NULL;\n    WClass.hCursor = NULL;\n    WClass.hbrBackground = WHITE_BRUSH;\n    WClass.lpszMenuName = \" \";\n    WClass.lpszClassName = \" \";\n    WClass.hIconSm = NULL;\n    RegisterClassExA(&WClass);\n \n    HINSTANCE Hinstance = NULL;\n    EspHWND = CreateWindowExA(WS_EX_TRANSPARENT | WS_EX_TOPMOST | WS_EX_LAYERED, \" \", \" \", WS_POPUP, WBounds.left, WBounds.top, WBounds.right - WBounds.left, WBounds.bottom + WBounds.left, NULL, NULL, Hinstance, NULL);\n \n    SetLayeredWindowAttributes(EspHWND, RGB(255, 255, 255), 255, LWA_COLORKEY);\n    ShowWindow(EspHWND, 1);\n    CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)&WorkLoop, NULL, NULL, NULL);\n    while (GetMessageA(&Msg, NULL, NULL, NULL) > 0) {\n        TranslateMessage(&Msg);\n        DispatchMessageA(&Msg);\n        Sleep(1);\n    }\n    ExitThread(0);\n    return 0;\n}"
  },
  {
    "path": "CSGO-Glow/Source.cpp",
    "content": "#include <iostream>\n#include <Windows.h>\n#include <TlHelp32.h>\n#include \"Offsets.h\"\n\n#define dwLocalPlayer 0xD30B94\n#define dwGlowObjectManager 0x528C8D8\n#define dwEntityList 0x4D44A24\n#define m_iGlowIndex 0xA428\n#define m_iTeamNum 0xF4\n#define m_iHealth 0x100\n#define m_bDormant 0xED\n \nuintptr_t moduleBase;\nDWORD procId;\nHWND hwnd;\nHANDLE hProcess;\n\nuintptr_t GetModuleBaseAddress(const char* modName) {\n\tHANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, procId);\n\tif (hSnap != INVALID_HANDLE_VALUE) {\n\t\tMODULEENTRY32 modEntry;\n\t\tmodEntry.dwSize = sizeof(modEntry);\n\t\tif (Module32First(hSnap, &modEntry)) {\n\t\t\tdo {\n\t\t\t\tif (!strcmp(modEntry.szModule, modName)) {\n\t\t\t\t\tCloseHandle(hSnap);\n\t\t\t\t\treturn (uintptr_t)modEntry.modBaseAddr;\n\t\t\t\t}\n\t\t\t} while (Module32Next(hSnap, &modEntry));\n\t\t}\n\t}\n}\n\ntemplate<typename T> T RPM(SIZE_T address) {\n\tT buffer;\n\tReadProcessMemory(hProcess, (LPCVOID)address, &buffer, sizeof(T), NULL);\n\treturn buffer;\n}\n\ntemplate<typename T> void WPM(SIZE_T address, T buffer) {\n\tWriteProcessMemory(hProcess, (LPVOID)address, &buffer, sizeof(buffer), NULL);\n}\n\nstruct glowStructEnemy {\n\tfloat red = 1.f;\n\tfloat green = 0.f;\n\tfloat blue = 0.f;\n\tfloat alpha = 1.f;\n\tuint8_t padding[8];\n\tfloat unknown = 1.f;\n\tuint8_t padding2[4];\n\tBYTE renderOccluded = true;\n\tBYTE renderUnoccluded = false;\n\tBYTE fullBloom = false;\n}glowEnm;\n\nstruct glowStructLocal {\n\tfloat red = 0.f;\n\tfloat green = 1.f;\n\tfloat blue = 0.f;\n\tfloat alpha = 1.f;\n\tuint8_t padding[8];\n\tfloat unknown = 1.f;\n\tuint8_t padding2[4];\n\tBYTE renderOccluded = true;\n\tBYTE renderUnoccluded = false;\n\tBYTE fullBloom = false;\n}glowLocal;\n\nuintptr_t getLocalPlayer() {\n\treturn RPM<uintptr_t>(moduleBase + dwLocalPlayer);\n}\n\nint main() {\n\thwnd = FindWindowA(NULL, \"Counter-Strike: Global Offensive\");\n\tGetWindowThreadProcessId(hwnd, &procId);\n\tmoduleBase = GetModuleBaseAddress(\"client.dll\");\n\thProcess = OpenProcess(PROCESS_ALL_ACCESS, NULL, procId);\n\n\twhile (!GetAsyncKeyState(VK_END))\n\t{\n\t\tuintptr_t dwGlowManager = RPM<uintptr_t>(moduleBase + dwGlowObjectManager);\n\t\tint LocalTeam = RPM<int>(getLocalPlayer() + m_iTeamNum);\n\t\tfor (int i = 1; i < 32; i++) {\n\t\t\tuintptr_t dwEntity = RPM<uintptr_t>(moduleBase + dwEntityList + i * 0x10);\n\t\t\tint iGlowIndx = RPM<int>(dwEntity + m_iGlowIndex);\n\t\t\tint EnmHealth = RPM<int>(dwEntity + m_iHealth); if (EnmHealth < 1 || EnmHealth > 100) continue;\n\t\t\tint Dormant = RPM<int>(dwEntity + m_bDormant); if (Dormant) continue;\n\t\t\tint EntityTeam = RPM<int>(dwEntity + m_iTeamNum);\n\t\t\t\n\t\t\tif (LocalTeam == EntityTeam)\n\t\t\t{\n\t\t\t\tWPM<glowStructLocal>(dwGlowManager + (iGlowIndx * 0x38) + 0x4, glowLocal);\n\t\t\t}\n\t\t\telse if (LocalTeam != EntityTeam)\n\t\t\t{\n\t\t\t\tWPM<glowStructEnemy>(dwGlowManager + (iGlowIndx * 0x38) + 0x4, glowEnm);\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "CSGO-Radar/Source.cpp",
    "content": "#include <Windows.h>\n#include <TlHelp32.h>\n \n#define dwEntityList 0x4D44A04\n#define m_bSpotted 0x93D\n \nDWORD dwPid;\nHANDLE hProcess;\nDWORD client;\n \nuintptr_t GetModule(const char* modName, DWORD procId) {\n    HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, procId);\n    if (hSnap != INVALID_HANDLE_VALUE) {\n        MODULEENTRY32 modEntry;\n        modEntry.dwSize = sizeof(modEntry);\n        if (Module32First(hSnap, &modEntry)) {\n            do {\n                if (!strcmp(modEntry.szModule, modName)) {\n                    CloseHandle(hSnap);\n                    return (uintptr_t)modEntry.modBaseAddr;\n                }\n            } while (Module32Next(hSnap, &modEntry));\n        }\n    }\n}\n \ntemplate<typename T> T RPM(SIZE_T address) {\n    T buffer; ReadProcessMemory(hProcess, (void*)address, &buffer, sizeof(T), nullptr);\n    return buffer;\n}\n \ntemplate<typename T> void WPM(SIZE_T address, T buffer) {\n    WriteProcessMemory(hProcess, (void*)address, &buffer, sizeof(T), nullptr);\n}\n \nvoid main() {\n    GetWindowThreadProcessId(FindWindowA(0, \"Counter-Strike: Global Offensive\"), &dwPid);\n    hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, dwPid);\n    client = GetModule(\"client.dll\", dwPid);\n \n    while (true) {\n        for (int i = 1; i < 64; i++) {\n            DWORD dwCurrentEntity = RPM<DWORD>(client + dwEntityList + i * 0x10);\n            if (dwCurrentEntity) {\n                WPM<bool>(dwCurrentEntity + m_bSpotted, true);\n            }\n        }\n        Sleep(50);\n    }\n}\n"
  },
  {
    "path": "CSGO-Triggerbot/Source.cpp",
    "content": "#include <iostream>\n#include <Windows.h>\n#include <TlHelp32.h>\n\n#define m_iTeamNum 0xF4\n#define dwLocalPlayer 0xD29B0C\n#define dwEntityList 0x4D3D6AC\n#define m_iCrosshairId 0xB3D4\n\nuintptr_t moduleBase;\nDWORD procId;\nHWND hwnd;\nHANDLE hProcess;\n\nuintptr_t GetModuleBaseAddress(const char* modName) {\n\tHANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, procId);\n\tif (hSnap != INVALID_HANDLE_VALUE) {\n\t\tMODULEENTRY32 modEntry;\n\t\tmodEntry.dwSize = sizeof(modEntry);\n\t\tif (Module32First(hSnap, &modEntry)) {\n\t\t\tdo {\n\t\t\t\tif (!strcmp(modEntry.szModule, modName)) {\n\t\t\t\t\tCloseHandle(hSnap);\n\t\t\t\t\treturn (uintptr_t)modEntry.modBaseAddr;\n\t\t\t\t}\n\t\t\t} while (Module32Next(hSnap, &modEntry));\n\t\t}\n\t}\n}\n\ntemplate<typename T> T RPM(SIZE_T address) {\n\tT buffer;\n\tReadProcessMemory(hProcess, (LPCVOID)address, &buffer, sizeof(T), NULL);\n\treturn buffer;\n}\n\nuintptr_t getLocalPlayer() { //This will get the address to localplayer. \n\treturn RPM< uintptr_t>(moduleBase + dwLocalPlayer);\n}\n\nuintptr_t getPlayer(int index) {  //Each player in the game has an index.\n\treturn RPM< uintptr_t>(moduleBase + dwEntityList + index * 0x10); //We use index times 0x10 because the distance between each player 0x10.\n}\n\nint getTeam(uintptr_t player) { \n\treturn RPM<int>(player + m_iTeamNum);\n}\n\nint getCrosshairID(uintptr_t player) {\n\treturn RPM<int>(player + m_iCrosshairId);\n}\n\nint main() {\n\thwnd = FindWindowA(NULL, \"Counter-Strike: Global Offensive\"); \n\tGetWindowThreadProcessId(hwnd, &procId);\n\tmoduleBase = GetModuleBaseAddress(\"client.dll\");\n\thProcess = OpenProcess(PROCESS_ALL_ACCESS, NULL, procId); \n\n\twhile (!GetAsyncKeyState(VK_END)) {\n\t\tint CrosshairID = getCrosshairID(getLocalPlayer());\n\t\tint CrosshairTeam = getTeam(getPlayer(CrosshairID - 1));\n\t\tint LocalTeam = getTeam(getLocalPlayer());\n\t\tif (CrosshairID > 0 && CrosshairID < 32 && LocalTeam != CrosshairTeam)\n\t\t{\n\t\t\tif (GetAsyncKeyState(VK_MENU /*alt key*/))\n\t\t\t{\n\t\t\t\tmouse_event(MOUSEEVENTF_LEFTDOWN, NULL, NULL, 0, 0);\n\t\t\t\tmouse_event(MOUSEEVENTF_LEFTUP, NULL, NULL, 0, 0);\n\t\t\t\tSleep(100); //Optional\n\t\t\t}\n\t\t}\n\t}\n\n}\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2020 Heath Howren\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# CS:GO Cheat Library\n\n## Introduction\n\nThis is a collection of cheats for the video-game Counter-Strike: Global Offensive.<br />\nThese cheats were coded as part of a [YouTube series](https://www.youtube.com/watch?v=1y63M4BvG9A&list=PLzBukBmD3GxuBpWT7xV-pCN-Uu7WwtK7O).\n\n## Code Samples\n\n**Gaining access to the CSGO application**<br />\nThe window is stored ```HWND hwnd = FindWindowA(NULL, \"Counter-Strike: Global Offensive\");```<br />\nThe process ID is retrieved ```GetWindowThreadProcessId(hwnd, &procId);```<br />\nA handle is is created  ```HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, NULL, procId);```\n\n**How to read and write process memory** <br />\nHow to read process memory: ```RPM<variable type>(address +  offsets);``` <br />\nExample: ```RPM<int>(0xD30B94 + 0x4);``` <br />\n\nHow to write process memory: ```WPM<variable type>(address +  offsets, newValue);``` <br />\nExample: ```int value = 999; WPM<int>(0xD30B94 + 0x4, value);```\n\n## Installation\nUpdate the addresses and offsets. I reccomend using [Hazedumper](https://github.com/frk1/hazedumper) for this. <br />\nSet the character set to Multi-Byte.<br />\nBuild the application as **x86** and run as an administrator.<br />\n**Error trouble shooting**<br />\nIf you are having issues compiling check out the [faq](https://github.com/HeathHowren/CSGO-Cheats/blob/master/faq.md) for common issues I've seen!<br />\n\n\n## Contributions\n* [HeathHowren](https://github.com/HeathHowren)\n* [beans42](https://github.com/beans42)\n"
  },
  {
    "path": "faq.md",
    "content": "# Frequently asked questions and issues\n\n## Issues\n\n**The wrong character set being used**<br />\nI see this issue a lot, you muse set the character set to muli-byte. If you do not you will see an error like [this](https://i.gyazo.com/9407cb6bbb2f2bae25ea5615cc4166bb.png). <br />\nGo into the project properties and follow change the character set to multi-byte. <br />\n[Fix for VS Community IDE 2017](https://i.gyazo.com/47efe57114ecbfb2dbbbb630cb07ffe7.png)<br />\n[Fix for VS Community IDE 2019](https://i.gyazo.com/b427de2ada6066819bb20e9a9684f689.png)<br />\n\n**Cannot open source file \"pch.h\" or \"stafdx.h\"** <br />\nThis issue comes from not creating an empty project file. This is very easy to fix, and the error will look like [this](https://gyazo.com/fb4f6fa466ed438e31236af444dc5d96).<br />\nFirst delete the line that says ```#include \"pch.h\"``` or ```#include \"stafdx.h\"``` <br />\nGo into the project properties and [turn off using pre-compiled headers](https://i.gyazo.com/cd5056afcd785e168b737aa36efa1f97.png). <br />\n"
  }
]