Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- #include <iostream>
- #include <stdio.h>
- #include <TlHelp32.h>
- using std::cout;
- using std::cin;
- #include <limits>
- using std::numeric_limits;
- using std::streamsize;
- using namespace std;
- #include <cstdlib>
- using namespace std;
- HANDLE hProcess;
- DWORD GetModuleBase(const DWORD dwProcessId, const char *szModuleName);
- void WriteProcessMemory()
- {
- DWORD pID;
- HANDLE hHandle;
- HWND hWindow;
- SetConsoleTitle( "DosBox Hack by Sandaasu" );
- hWindow = FindWindow(0, "Counter-Strike: Global Offensive");
- GetWindowThreadProcessId( hWindow, &pID);
- hHandle = OpenProcess( PROCESS_ALL_ACCESS, 0, pID);
- if(hWindow == 0)
- {
- system("color 0c");
- cout << "Cannot find game.. Closing now.." << endl;
- Sleep(3000);
- exit(1);
- }
- }
- void appTitle()
- {
- WriteProcessMemory();
- }
- void appFeatures()
- {
- system("color 0a");
- cout << "DosBox Hack" << endl;
- cout << "Created by : Sandaasu" << endl;
- cout << "Version : 0.1 Beta \n" << endl;
- cout << "Starting......" << endl;
- Sleep(5000);
- system("cls");
- cout << "======================================================" << endl;
- cout << "[ HOTKEYS ]" << endl << endl;
- cout << "\t NumPad1 = SV bypass Activate" << endl;
- cout << "\t NumPad2 = Wallhack ON" << endl;
- cout << "\t NumPad3 = Wallhack OFF" << endl;
- cout << "\t NumPad4 = ESP ON " << endl;
- cout << "\t NumPad5 = ESP OFF" << endl;
- cout << "\t NumPad6 = FPS Active" << endl;
- cout << "\t NumPad7 = Glasswalls Active" << endl;
- cout << "\t NumPad8 = Remove Smoke" << endl;
- //cout << "\t F1 = PANIC Key" << endl;
- cout << "======================================================" << endl;
- cout << "\tEsc: Close" << endl << endl << endl;
- }
- void appHotkeys()
- {
- WriteProcessMemory();
- DWORD pID;
- HANDLE hHandle;
- HWND hWnd;
- SetConsoleTitle( "DosBox Hack by Sandaasu" );
- hWnd = FindWindow(0, "Counter-Strike: Global Offensive");
- GetWindowThreadProcessId( hWnd, &pID);
- hHandle = OpenProcess( PROCESS_ALL_ACCESS, 0, pID);
- while(true)
- {
- if(GetAsyncKeyState(VK_NUMPAD1))
- {//SV_bypass
- DWORD EngineDll;
- EngineDll = GetModuleBase( pID, "engine.dll");
- int bypass_value = 1;
- /////////////////////////////
- int offset = 0x6FB9D8;
- /////////////////////////////
- DWORD ibypass_value = sizeof(bypass_value);
- WriteProcessMemory( hHandle, (LPVOID)( EngineDll + offset), &bypass_value, ibypass_value, 0);
- cout << "sv bypass activated. " << endl;
- }
- if(GetAsyncKeyState(VK_NUMPAD2))
- {// WH ON
- DWORD ClientDll;
- ClientDll = GetModuleBase( pID, "client.dll");
- int wh_value = 2;
- /////////////////////////////
- int offset = 0x94C870;
- /////////////////////////////
- DWORD iwh_value = sizeof(wh_value);
- WriteProcessMemory( hHandle, (LPVOID)( ClientDll + offset), &wh_value, iwh_value, 0);
- cout << "Wallhack ON . " << endl;
- }
- if(GetAsyncKeyState(VK_NUMPAD3))
- {//WH OFF
- DWORD ClientDll;
- ClientDll = GetModuleBase( pID, "client.dll");
- int wh_value = 1;
- /////////////////////////////
- int offset = 0x94C870;
- /////////////////////////////
- DWORD iwh_value = sizeof(wh_value);
- WriteProcessMemory( hHandle, (LPVOID)( ClientDll + offset), &wh_value, iwh_value, 0);//8D0610
- cout << "Wallhack OFF. " << endl;
- }
- if(GetAsyncKeyState(VK_NUMPAD4))
- {//ESP ON
- DWORD ClientDll;
- ClientDll = GetModuleBase( pID, "client.dll");
- int esp_value = 1;
- /////////////////////////////
- int offset = 0x94C610;
- /////////////////////////////
- DWORD iesp_value = sizeof(esp_value);
- WriteProcessMemory( hHandle, (LPVOID)( ClientDll + offset), &esp_value, iesp_value, 0);
- cout << "ESP ON. " << endl;
- }
- if(GetAsyncKeyState(VK_NUMPAD5))
- {//ESP OFF
- DWORD ClientDll;
- ClientDll = GetModuleBase( pID, "client.dll");
- int esp_value = 0;
- /////////////////////////////
- int offset = 0x94C610;
- /////////////////////////////
- DWORD iesp_value = sizeof(esp_value);
- WriteProcessMemory( hHandle, (LPVOID)( ClientDll + offset), &esp_value, iesp_value, 0);
- cout << "ESP OFF. " << endl;
- }
- if(GetAsyncKeyState(VK_NUMPAD6))
- {//FPS ON
- DWORD ClientDll;
- ClientDll = GetModuleBase( pID, "client.dll");
- int fps_value = 2;
- /////////////////////////////
- int offset = 0x9AFEF8;
- /////////////////////////////
- DWORD ifps_value = sizeof(fps_value);
- WriteProcessMemory( hHandle, (LPVOID)( ClientDll + offset), &fps_value, ifps_value, 0);
- cout << "FPS Active. " << endl;
- }
- if(GetAsyncKeyState(VK_NUMPAD7))
- {//Glasswalls
- DWORD materialsystemDll;
- materialsystemDll = GetModuleBase( pID, "materialsystem.dll");
- int walls_value = 2;
- /////////////////////////////
- int offset = 0x33B428;
- /////////////////////////////
- DWORD iwalls_value = sizeof(walls_value);
- WriteProcessMemory( hHandle, (LPVOID)( materialsystemDll + offset), &walls_value, iwalls_value, 0);
- Sleep(3000);
- int walls2_value = 1;
- DWORD iwalls2_value = sizeof(walls2_value);
- WriteProcessMemory( hHandle, (LPVOID)( materialsystemDll + offset), &walls2_value, iwalls2_value, 0);
- cout << "Glasswalls Active. " << endl;
- }
- if(GetAsyncKeyState(VK_NUMPAD8))
- {//NoSmoke
- DWORD ClientDll;
- ClientDll = GetModuleBase( pID, "client.dll");
- int smoke_value = 0;
- /////////////////////////////
- int offset = 0x9AAB00;
- /////////////////////////////
- DWORD ismoke_value = sizeof(smoke_value);
- WriteProcessMemory( hHandle, (LPVOID)( ClientDll + offset), &smoke_value, ismoke_value, 0);
- cout << "No Smoke Active. " << endl;
- }
- if(GetAsyncKeyState(VK_F1))
- {//PANIC
- //enter panic here
- }
- }
- }
- int main()
- {
- appTitle();
- appFeatures();
- appHotkeys();
- }
- DWORD GetModuleBase(const DWORD dwProcessId, const char *szModuleName)
- {
- 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;
- }
Add Comment
Please, Sign In to add comment