Advertisement
Guest User

Source (Partial).cpp

a guest
Feb 16th, 2023
537
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.53 KB | Cybersecurity | 0 0
  1. //Komrade pls dont leak this valuable code
  2.  
  3. #include <iostream>
  4. #include <Windows.h>
  5. #include <TlHelp32.h>
  6.  
  7. #define CSGO_WINDOW_NAME "Counter-Strike: Global Offensive - Direct3D 9"
  8. #define dwLocalPlayer 0xDEA964 //Pay attention to these offsets! They might change with game updates...
  9. #define dwEntityList 0x4DFFEF4
  10. #define dwViewMatrix 0x4DF0D24
  11. #define m_dwBoneMatrix 0x26A8
  12. #define m_iTeamNum 0xF4
  13. #define m_iHealth 0x100
  14. #define m_vecOrigin 0x138
  15. #define m_bDormant 0xED
  16.  
  17. /*OMITTED CODE*/
  18.  
  19. template<typename T> T RPM(SIZE_T address) {
  20.     T buffer;
  21.     ReadProcessMemory(hProcess, (LPCVOID)address, &buffer, sizeof(T), NULL);
  22.     return buffer;
  23. }
  24.  
  25. class Vector3 {
  26. public:
  27.     float x, y, z;
  28.     Vector3() : x(0.f), y(0.f), z(0.f) {}
  29.     Vector3(float _x, float _y, float _z) : x(_x), y(_y), z(_z) {}
  30. };
  31.  
  32. /*OMITTED CODE*/
  33.  
  34. /*OMITTED CODE*/
  35.  
  36. /*OMITTED CODE*/
  37.  
  38. void Shoot() {
  39.     mouse_event(MOUSEEVENTF_LEFTDOWN, NULL, NULL, 0, 0);
  40.     mouse_event(MOUSEEVENTF_LEFTUP, NULL, NULL, 0, 0);
  41. }
  42.  
  43. const Vector3 targets[] = {
  44.     Vector3(0, 600, 200),
  45.     Vector3(0, -40, -50),
  46.     Vector3(0, -40, -50),
  47.  
  48.     /*OMITTED CODE*/
  49.  
  50.     Vector3(0, 0, 50),
  51.     Vector3(0, 0, 50)
  52. };
  53.  
  54. int main() {
  55.     puts("========================================");
  56.     puts("Professional CS-GO cheat client (v 69.1)");
  57.     puts("========================================");
  58.     puts("Did you use \"-insecure\" flag while running CS-GO??? Close this now if you didn't!");
  59.  
  60.     Sleep(1000);
  61.  
  62.     puts("Opening process memory now!");
  63.  
  64.     Sleep(1000);
  65.  
  66.  
  67.     hwnd = FindWindowA(NULL, CSGO_WINDOW_NAME);
  68.     GetWindowThreadProcessId(hwnd, &procId);
  69.     moduleBase = GetModuleBaseAddress("client.dll");
  70.     hProcess = OpenProcess(PROCESS_ALL_ACCESS, NULL, procId);
  71.     hdc = GetDC(hwnd);
  72.  
  73.     puts("Starting cheat...");
  74.     puts("Instructions: Press & Hold DELETE in-game to activate aimbot");
  75.     puts("              Press END to close program.");
  76.  
  77.     while (!GetAsyncKeyState(VK_END)) { //press the "end" key to end the hack
  78.         vm = RPM<view_matrix_t>(moduleBase + dwViewMatrix);
  79.  
  80.         if (GetAsyncKeyState(VK_DELETE)) //press the "delete" key to activate the hack
  81.         {
  82.             Vector3 headPos = get_head(GetLocalPlayer());
  83.             Vector3 reference = Vector3(headPos.x + 100.0f, headPos.y, headPos.z);
  84.  
  85.             for (int i = 0; i < sizeof(targets) / sizeof(Vector3) && GetAsyncKeyState(VK_DELETE); i++)
  86.             {
  87.                 Vector3 target = WorldToScreen(Vector3(reference.x + targets[i].x, reference.y + targets[i].y, reference.z + targets[i].z), vm);
  88.                 SetCursorPos(target.x, target.y);
  89.                 Shoot();
  90.  
  91.                 Sleep(200);
  92.             }
  93.         }
  94.     }
  95.  
  96.     return 0;
  97. }
  98.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement