Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- #include <stdio.h>
- #include "TlHelp32.h"
- DWORD GetModule(const char* moduleName, int iPid) // cant exactly remember where i got this, i think it was [censored by staff]!
- {
- HANDLE hmodule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, iPid);
- MODULEENTRY32 mEntry;
- mEntry.dwSize = sizeof(mEntry);
- do {
- if (!strcmp(mEntry.szModule, (LPSTR)moduleName)) {
- CloseHandle(hmodule);
- return (DWORD)mEntry.hModule;
- }
- } while (Module32Next(hmodule, &mEntry));
- return (DWORD)0;
- }
- int main(int argc, char* argv[]) // we don't use argc or argv, but it's force of habit
- {
- // get handle to csgo and get base address of client.dll
- HWND hWindow = FindWindowA(0, "Counter-Strike: Global Offensive");
- DWORD dwPid;
- GetWindowThreadProcessId(hWindow, &dwPid);
- HANDLE hHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, dwPid);
- DWORD client = GetModule("client_panorama.dll", dwPid);
- // definitions for later
- DWORD dwCurrentEntity;
- char cStopHack2;
- float flSensorTime;
- // main hack loop
- while (cStopHack2 != 1)
- {
- if (GetAsyncKeyState(VK_END) & 1)
- {
- cStopHack2 = 1;
- }
- // loop through entities
- for (int i = 1; i < 65; i++)
- {
- // get entity in memory
- ReadProcessMemory(hHandle, (LPVOID)(client + 0x4D06CB4 + i * 0x10), &dwCurrentEntity, sizeof(dwCurrentEntity), 0);
- if (dwCurrentEntity)
- {
- // get the timer float depending on if we want to exit or not, then write it to memory!
- // technically we should only be setting it when they get off dormancy, but that would cost us another RPM!
- flSensorTime = (cStopHack2 == 1) ? 0.f : 86400.f;
- WriteProcessMemory(hHandle, (LPVOID)(dwCurrentEntity + 0x3960), &flSensorTime, sizeof(flSensorTime), 0);
- }
- }
- Sleep(50);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement