Source Code Simple Internal CSGO Hack

  • CSGO recently moved logic from 'client_panorama.dll' to 'client.dll', you must update all code that uses 'client_panorama.dll' and replace it with 'client.dll' or the code will not work.
Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

tappineapple

Full Member
Jun 6, 2019
34
568
3
How long you been coding/hacking?
3 Weeks
Coding Language
C++
Here is my source code for my csgo cheat I've been working on. This is where I followed along while watching the csgo series. I am aware that there is a lot of horrible code in this (like really bad), I would like to believe it's because of how I went through one step at a time without really thinking too much into the future.

Features:
Glow Hack (numpad 1)
Trigger (numpad 2)
Bhop (numpad 3)
RCS (numpad 4)
No Flash (numpad 5)

Press end to detach it.

I hope this helps someone is one way or another. Happy hacking!
dllmain:
// dllmain.cpp : Defines the entry point for the DLL application.
#include <Windows.h>
#include "framework.h"
#include <iostream>
#include "vector.h"
#include <string>

struct offsets
{
    uintptr_t glowIndex = 0xA438;
    uintptr_t glowObject = 0x529B3C8;
    uintptr_t localPlayer = 0xD3EC6C;
    uintptr_t entityList = 0x4D534EC;
    uintptr_t team = 0xF4;
    uintptr_t flags = 0x104;
    uintptr_t fjump = 0x51FD20C;
    uintptr_t vecVel = 0x114;
    uintptr_t forceLMB = 0x3184A80;
    uintptr_t crosshair = 0xB3E4;
    uintptr_t health = 0x100;
    uintptr_t shotsFired = 0xA390;
    uintptr_t clientState = 0x58ADD4;
    uintptr_t viewAngles = 0x4D88;
    uintptr_t aimPunchAngles = 0x302C;
    uintptr_t flashDur = 0xA420;
}offset;



struct addresses
{
    uintptr_t localPlayer;
    uintptr_t clientModule;
    uintptr_t engineModule;
    BYTE flag;
    uintptr_t vel;
    Vec3* viewAngles;
    int* IshotsFired;
    Vec3* aimPunchAngle;
    Vec3 oPunch = { 0, 0, 0 };
    
}addr;





void glowHack()
{
    //std::cout << "Glowing!" << std::endl;
    uintptr_t glowObj = *(uintptr_t*)(addr.clientModule + offset.glowObject);
    int myTeam = *(int*)(addr.localPlayer + offset.team);
    //loop through entitys
    for (int i = 0; i < 64; i++)
    {
        uintptr_t ent = *(uintptr_t*)(addr.clientModule + offset.entityList + i * 0x10);
        if (ent != NULL)
        {
            int entTeam = *(int*)(ent + offset.team);
            int glowInd = *(int*)(ent + offset.glowIndex);

            if (myTeam == entTeam)
            {
                //MemClass.writeMem<float>(glowObject + ((glowIndex * 0x38) + 0x4), 0);// r
                *(float*)(glowObj + ((glowInd * 0x38) + 0x4)) = 0; // red
                *(float*)(glowObj + ((glowInd * 0x38) + 0x8)) = 2; // green
                *(float*)(glowObj + ((glowInd * 0x38) + 0xC)) = 0; // blue
                *(float*)(glowObj + ((glowInd * 0x38) + 0x10)) = 1; // alpha
            }
            else
            {
                *(float*)(glowObj + ((glowInd * 0x38) + 0x4)) = 2; // red
                *(float*)(glowObj + ((glowInd * 0x38) + 0x8)) = 0; // green
                *(float*)(glowObj + ((glowInd * 0x38) + 0xC)) = 0; // blue
                *(float*)(glowObj + ((glowInd * 0x38) + 0x10)) = 1; // alpha
            }
            *(bool*)(glowObj + ((glowInd * 0x38) + 0x24)) = true;
            *(bool*)(glowObj + ((glowInd * 0x38) + 0x25)) = false;

        }
        

    }
}

void bHop()
{
    //std::cout << "Hopping!" << std::endl;
    addr.flag = *(BYTE*)(addr.localPlayer + offset.flags);


    if (GetAsyncKeyState(VK_SPACE) && addr.flag & (1 << 0))
    {
        //checks to see if gamer is moving
        addr.vel = *(BYTE*)(addr.localPlayer + offset.vecVel);

        if (addr.vel != 0)
        {
            *(uintptr_t*)(addr.clientModule + offset.fjump) = 5;
            Sleep(10);
            *(uintptr_t*)(addr.clientModule + offset.fjump) = 4;

        }
    }
}


void tBot()
{
    //std::cout << "Triggering!" << std::endl;
    bool canShoot;
    int crosshair = *(int*)(addr.localPlayer + offset.crosshair);
    int myTeam = *(int*)(addr.localPlayer + offset.team);
    if (crosshair != 0 && crosshair < 64)
    {
        uintptr_t entity = *(uintptr_t*)(addr.clientModule + offset.entityList + (crosshair - 1) * 0x10);
        int eTeam = *(int*)(entity + offset.team);
        int eHealth = *(int*)(entity + offset.health);

        if (eTeam != myTeam && eHealth > 0)
            canShoot = true;
        else
            canShoot = false;

    }
    else
        canShoot = false;

    //shoots
    if (canShoot)
    {
        //can shoot
        
        *(int*)(addr.clientModule + offset.forceLMB) = 5;
        Sleep(20);
        *(int*)(addr.clientModule + offset.forceLMB) = 4;
    }

}

void rcs()
{

    Vec3 punchAngle = *addr.aimPunchAngle * 2;

    if (*addr.IshotsFired > 1 && GetAsyncKeyState(VK_LBUTTON))
    {
        Vec3 newAngle = *addr.viewAngles + addr.oPunch - punchAngle;
        newAngle.Normalize();
        *addr.viewAngles = newAngle;
    }
    addr.oPunch = punchAngle;

}

void noFlash()
{
    float* flashDur = (float*)(addr.localPlayer + offset.flashDur);
    if (*flashDur > 0)
    {
        *flashDur = 0;
    }
}

int main()
{
    bool bHoping = false, tBoting = false, glowing = false, recoilControling = false, antiFlash = false;
    Vec3 oPunch{ 0,0,0 };

    AllocConsole();
    FILE* f;
    freopen_s(&f, "CONOUT$", "w", stdout);
    std::cout << "Pineapple Hax are now running!" << std::endl;

    addr.clientModule = (uintptr_t)GetModuleHandle(L"client.dll");

    while (true) //hack loop
    {
        addr.localPlayer = *(uintptr_t*)(addr.clientModule + offset.localPlayer);
        if (addr.localPlayer != NULL) //(if you're in a game)
        {
            addr.engineModule = (uintptr_t)GetModuleHandle(L"engine.dll");

            addr.viewAngles = (Vec3*)(*(uintptr_t*)(addr.engineModule + offset.clientState) + offset.viewAngles);
            addr.IshotsFired = (int*)(addr.localPlayer + offset.shotsFired);
            addr.aimPunchAngle = (Vec3*)(addr.localPlayer + offset.aimPunchAngles);
    
            

            if (glowing)
                glowHack();
            if (tBoting)
                tBot();
            if (bHoping)
                bHop();
            if (recoilControling)
                rcs();
            if (antiFlash)
                noFlash();
            
        }

        if (GetAsyncKeyState(VK_NUMPAD1) & 1) //toggle glowing
        {
            glowing = !glowing;
            if (glowing == true)
            {
                std::cout << "ESP: enabled" << std::endl;
            }
            else
            {
                std::cout << "ESP: disabled" << std::endl;
            }
        }
        if (GetAsyncKeyState(VK_NUMPAD2) & 1) //toggle trigger
        {
            tBoting = !tBoting;
            if (tBoting == true)
            {
                std::cout << "TRIGGER: enabled" << std::endl;
            }
            else
            {
                std::cout << "TRIGGER: disabled" << std::endl;
            }
        }
        if (GetAsyncKeyState(VK_NUMPAD3) & 1) //toggle bhop
        {
            bHoping = !bHoping;
            if (bHoping == true)
            {
                std::cout << "BHOP: enabled" << std::endl;
            }
            else
            {
                std::cout << "BHOP: disabled" << std::endl;
            }
        }
        if (GetAsyncKeyState(VK_NUMPAD4) & 1) //toggle rcs
        {
            recoilControling = !recoilControling;
            if (recoilControling == true)
            {
                std::cout << "RCS: enabled" << std::endl;
            }
            else
            {
                std::cout << "RCS: disabled" << std::endl;
            }
        }
        if (GetAsyncKeyState(VK_NUMPAD5) & 1) //toggle flash
        {
            antiFlash = !antiFlash;
            if (antiFlash == true)
            {
                std::cout << "Anti-Flash: enabled" << std::endl;
            }
            else
            {
                std::cout << "Anti-Flash: disabled" << std::endl;
            }
        }

        if (GetAsyncKeyState(VK_END))
        {
            fclose(f);
            FreeConsole();
            FreeLibraryAndExitThread(NULL, NULL);
            return 0;
            return 0;
        }

    }



}

BOOL APIENTRY DllMain(HMODULE hModule,
    DWORD  ul_reason_for_call,
    LPVOID lpReserved
)
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
    {
        DisableThreadLibraryCalls(hModule);
        CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)main, NULL, NULL, NULL);
    }
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}
 

Attachments

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,349
78,998
2,412
The code is fine my dude, you followed the tutorials exactly how you were instructed to do them and you combined all the features into a nice little hack using the knowledge you gained from doing the tutorials. This is exactly what everyone should be doing while learning. As you learn more stuff and get better at coding, you can go back and re-write this project using all the new stuff you learn. You will find better ways to do things and everyday you will get better.

This is exactly 100% the correct way to learn. The people who go straight to a CSGO SDK are the idiots that never learn anything.
 

esp1z1

I know like 40% of what I’m doing. Ok...
Dank Tier VIP
Dank Tier Donator
Aug 6, 2018
196
9,043
4
I only see slight issues with the code.
I’d recommend this video it should help out! :)
 
  • Like
Reactions: tappineapple

rocco

Dank Tier Donator
Jan 27, 2020
1
208
0
The code is fine my dude, you followed the tutorials exactly how you were instructed to do them and you combined all the features into a nice little hack using the knowledge you gained from doing the tutorials. This is exactly what everyone should be doing while learning. As you learn more stuff and get better at coding, you can go back and re-write this project using all the new stuff you learn. You will find better ways to do things and everyday you will get better.

This is exactly 100% the correct way to learn. The people who go straight to a CSGO SDK are the idiots that never learn anything.
This Is why I like GH. Everyone was a beginner sometime and when an admin drops a reply like this 🍻.
No hesitation to not to donate, too bad I didnt join this community earlier.
 

tappineapple

Full Member
Jun 6, 2019
34
568
3
I think a mod changed the title of this thread (which is fine) but they made it say external when it's internal.
 
  • Like
Reactions: Rake
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods