Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. // HackAnyGamePt2.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "proc.h"
  6. #include "string"
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9. #include <time.h>
  10. #include <sstream>
  11. #include <time.h>
  12.  
  13.  
  14. //using namespace std;
  15.  
  16. int main()
  17. {
  18.  
  19.  
  20. for (;;)
  21. {
  22. DWORD procId = GetProcId(L"gta_sa.exe");
  23. uintptr_t moduleBase = GetModuleBaseAddress(procId, L"samp.dll");
  24. uintptr_t moduleBaseSA = GetModuleBaseAddress(procId, L"gta_sa.exe");
  25. HANDLE hProcess = 0;
  26. hProcess = OpenProcess(PROCESS_ALL_ACCESS, NULL, procId);
  27. uintptr_t versionAddr = moduleBase + 0xD3B93;
  28. char versiontype;
  29. char newVersion = 0x34;
  30.  
  31. ReadProcessMemory(hProcess, (CHAR*)versionAddr, &versiontype, sizeof(versiontype), nullptr);
  32. WriteProcessMemory(hProcess, (CHAR*)versionAddr, &newVersion, sizeof(newVersion), nullptr);
  33. std::cout << "version = " << std::dec << versiontype << std::endl;
  34. Sleep(2500);
  35. system("CLS");
  36. }
  37.  
  38. getchar();
  39.  
  40. return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement