This a memory hack tutorial, the "how to get offset tutorial" will follow later.
If you want you can port this css memory hack easy to csgo, the tutorial for that will follow later too.
If you have any questions feel free to write me a pm.
Links :
Virtual-Key Codes (Windows)
Variables. Data Types. - C++ Documentation
If you want you can port this css memory hack easy to csgo, the tutorial for that will follow later too.
If you have any questions feel free to write me a pm.
Code:
#include <windows.h>//libary
#include <iostream>//libary
#include <TlHelp32.h>//libary
using namespace std;//set the namespace to "standart"
DWORD GetModuleBaseExtern(const DWORD dwProcessId, const char *szModuleName)//function to get the modul base
{
#ifdef _GMBE_CHECK_PARAMS_
if (!dwProcessID) || (!szModuleName) return 0;
#endif
HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessId);
if (!hSnap) return 0;
MODULEENTRY32 me;
me.dwSize = sizeof(MODULEENTRY32);
DWORD dwReturn = 0;
if (Module32First(hSnap, &me)) {
while (Module32Next(hSnap, &me)) {
if (lstrcmpi(me.szModule, szModuleName) == 0) {
dwReturn = (DWORD)me.modBaseAddr;
break;
}
}
}
CloseHandle(hSnap);
return dwReturn;
}
int main(int argc,char* argv)//the "main" of the programm
{
//variables
SetConsoleTitle("CSS Hack");//set the title of the console
HWND hwnd = NULL;//for the process handle
DWORD pid;//for the process handle
HANDLE hProcess;//for the process handle
DWORD clientbase;//for the dll handle
DWORD overlay;//for the dll handle
unsigned long pID;//for the process handle
DWORD Localentity;//for the Localentity -> DWORD Sign-less double-word (32-bit).
int m_fFlags;//for the flags -> int(intenger) 32bit big
int steamoverlay;//for the steamoverlay -> int(intenger) 32bit big
int drawothermodels = 1;// for the drawothermodels -> int(intenger) 32bit big
int drawothermodels_an = 2;// for the drawothermodels -> int(intenger) 32bit big
int Flash_aus = 0;// for the no flash -> int(intenger) 32bit big
int smoke_aus = 0;// for the no smoke -> int(intenger) 32bit big
int smoke_an = 1;// for the no smoke -> int(intenger) 32bit big
int InCross;//for the triggerbot -> int(intenger) 32bit big and save whole numbers like, 1, 2, 3, 4, 5, 6 or -1, -2 and so on...
bool an = false;//for the if alternative -> the type bool returns true and false
anfang :
//process handle
DWORD GetModuleBaseExtern(const DWORD dwProcessId, const char *szModuleName);
HWND hWnd = FindWindow(NULL,"Counter-Strike Source");
GetWindowThreadProcessId(hWnd,&pID);
hProcess = OpenProcess(PROCESS_ALL_ACCESS,FALSE,pID);
hwnd = FindWindow (NULL, "Counter-Strike Source");
GetWindowThreadProcessId (hwnd, &pid);
hProcess = OpenProcess (PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_QUERY_INFORMATION, FALSE, pid);//set the process rights
GetWindowThreadProcessId (hwnd, &pid);
hProcess = OpenProcess (PROCESS_ALL_ACCESS, 0, pid);
clientbase = GetModuleBaseExtern(pid, "client.dll");//get the "client.dll"
overlay = GetModuleBaseExtern(pid,"gameoverlayrenderer.dll");//get the "gameoverlayrenderer.dll"
{
while(hwnd == 0)//loop
{
Sleep(2000);//sleeptime for 2 seconds
goto anfang;//jump command to "anfang :"
}
}
while(hwnd != 0)//loop
{
//rpm
ReadProcessMemory(hProcess, (LPCVOID)(clientbase + 0x7CC0F4), &Localentity, sizeof(DWORD), NULL);//read out the localentity, more information in the offset tutorial
ReadProcessMemory(hProcess, (LPCVOID)(Localentity + 0x14A8), &InCross, sizeof(int), NULL);//read out if an entity is in your cross, more information in the offset tutorial
//wpm
WriteProcessMemory(hProcess, (PBYTE*)(Localentity + 0x1410), &Flash_aus, sizeof(int), NULL);//write into m_fFlashMaxAlpha, more information in the offset tutorial
//bhop part
if (GetAsyncKeyState(VK_SPACE))//check if space is pressed
{
ReadProcessMemory(hProcess, (LPCVOID)(Localentity + 0x314), &m_fFlags, sizeof(int), NULL);//read out the flags, more information in the offset tutorial
if( m_fFlags & ( 1 || 3 || 5 || 7 ))//looks for your state
{
ReadProcessMemory(hProcess, (LPCVOID)(overlay + 0x7BF60), &steamoverlay, sizeof(int), NULL);//read out the value of the steamoverlay
if(steamoverlay == 0)//if steam overlay is not open it will send the commands below
{
SendMessage( hWnd, WM_KEYDOWN, VK_SPACE, 0x390000 );//send the key space down to the process
Sleep(30);//sleeptime for 30 milliseconds
SendMessage( hWnd, WM_KEYUP, VK_SPACE, 0x390000 );//send the key space up to the process
Sleep(30);//sleeptime for 30 milliseconds
}
}
}
//wireframe an no smoke part
if (GetAsyncKeyState(VK_INSERT) && an == false)//check if the key "INSERT" is pressed if its true it will look into the second part of the logical link if this is true too than it will do the stuff in the clamps
{
WriteProcessMemory(hProcess, (PBYTE*)(clientbase + 0x78DAD0), &drawothermodels_an, sizeof(int), NULL);//write into the client.dll at the memory the value of "drawothermodels" which is 1 "int drawothermodels_an = 2;" , "an means in english on"
WriteProcessMemory(hProcess, (PBYTE*)(clientbase + 0x7BFAB0), &smoke_aus, sizeof(int), NULL);//write into the client.dll at the memory the value of "smoke_an" which is 1 "int smoke_aus = 0;" , "aus means in english off"
an = true;//the variable gets the value "true" (bool)
Sleep(1000);//sleeptime for 1 second
}
if (GetAsyncKeyState(VK_INSERT) && an == true)//check if the key "INSERT" is pressed if its true it will look into the second part of the logical link if this is true too than it will do the stuff in the clamps
{
WriteProcessMemory(hProcess, (PBYTE*)(clientbase + 0x78DAD0), &drawothermodels, sizeof(int), NULL);//write into the client.dll at the memory the value of "drawothermodels" which is 1 "int drawothermodels = 1;"
WriteProcessMemory(hProcess, (PBYTE*)(clientbase + 0x7BFAB0), &smoke_an, sizeof(int), NULL);//write into the client.dll at the memory the value of "smoke_an" which is 1 "int smoke_an = 1;" , "an means in english on"
an = false;//the variable gets the value "false" (bool)
Sleep(1000);//sleeptime for 1 second
}
//triggerbot part
if(GetAsyncKeyState(VK_XBUTTON1) && InCross > 0 && InCross <= 64)// all player have a id between 0 and 64, more information you will find in the offset tutorial
{
mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );// press the left mouse button
Sleep( 50 );//sleeptime for 50 milliseconds
mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );// lift the left mouse button
Sleep( 75 );//sleeptime for 75 milliseconds
}
//check if the game is not running
if(!FindWindow(NULL,"Counter-Strike Source")) // looking if Counter-Strike Source is running, if not the application will close
{
exit(0);//close the appclication
}
Sleep(5);//slepptime for 5 milliseconds
}
}
Virtual-Key Codes (Windows)
Variables. Data Types. - C++ Documentation