Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. #include <Windows.h>
  2. #include <stdio.h>
  3. #include "TlHelp32.h"
  4.  
  5. DWORD GetModule(const char* moduleName, int iPid) // cant exactly remember where i got this, i think it was [censored by staff]!
  6. {
  7. HANDLE hmodule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, iPid);
  8. MODULEENTRY32 mEntry;
  9. mEntry.dwSize = sizeof(mEntry);
  10.  
  11. do {
  12. if (!strcmp(mEntry.szModule, (LPSTR)moduleName)) {
  13. CloseHandle(hmodule);
  14.  
  15. return (DWORD)mEntry.hModule;
  16. }
  17. } while (Module32Next(hmodule, &mEntry));
  18.  
  19. return (DWORD)0;
  20. }
  21.  
  22. int main(int argc, char* argv[]) // we don't use argc or argv, but it's force of habit
  23. {
  24. // get handle to csgo and get base address of client.dll
  25. HWND hWindow = FindWindowA(0, "Counter-Strike: Global Offensive");
  26. DWORD dwPid;
  27. GetWindowThreadProcessId(hWindow, &dwPid);
  28. HANDLE hHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, dwPid);
  29. DWORD client = GetModule("client_panorama.dll", dwPid);
  30.  
  31. // definitions for later
  32. DWORD dwCurrentEntity;
  33. char cStopHack2;
  34. float flSensorTime;
  35.  
  36. // main hack loop
  37. while (cStopHack2 != 1)
  38. {
  39. if (GetAsyncKeyState(VK_END) & 1)
  40. {
  41. cStopHack2 = 1;
  42. }
  43.  
  44. // loop through entities
  45. for (int i = 1; i < 65; i++)
  46. {
  47. // get entity in memory
  48. ReadProcessMemory(hHandle, (LPVOID)(client + 0x4D06CB4 + i * 0x10), &dwCurrentEntity, sizeof(dwCurrentEntity), 0);
  49. if (dwCurrentEntity)
  50. {
  51. // get the timer float depending on if we want to exit or not, then write it to memory!
  52. // technically we should only be setting it when they get off dormancy, but that would cost us another RPM!
  53. flSensorTime = (cStopHack2 == 1) ? 0.f : 86400.f;
  54. WriteProcessMemory(hHandle, (LPVOID)(dwCurrentEntity + 0x3960), &flSensorTime, sizeof(flSensorTime), 0);
  55. }
  56. }
  57. Sleep(50);
  58. }
  59.  
  60. return 0;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement