Advertisement
Guest User

Untitled

a guest
Jan 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. // Written By maxbd / MaxIsBack
  2.  
  3. #include <Windows.h>
  4. #include <iostream>
  5.  
  6. typedef unsigned long dw;
  7. int main(int argc, char* argv[])
  8. {
  9. int nStylePoints = 710000; // --Limit, I think.
  10. while (true)
  11. {
  12. Sleep(10);
  13. try
  14. {
  15. HWND hWnd = FindWindow(NULL, "Clustertruck");
  16. if (!hWnd) { std::cout << "\n Couldn't Find ClusterTruck Window! \n"; std::getchar(); return -1; }
  17. dw pRocIDy;
  18. GetWindowThreadProcessId(hWnd, &pRocIDy);
  19. if(!pRocIDy) { std::cout << "\n Couldn't Find ClusterTruck Process! \n"; std::getchar(); return -1; }
  20. HANDLE hNdl = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pRocIDy);
  21. if (GetAsyncKeyState(VK_DELETE))
  22. {
  23. Sleep(100);
  24. std::cout << "\n Press Any Key To End Program. \n";
  25. std::getchar();
  26. return 0;
  27. }
  28. else if (GetAsyncKeyState(VK_F7)) // Press F7 to change style point's value.
  29. {
  30. Sleep(1000);
  31. if (WriteProcessMemory(hNdl, (LPVOID)argv[1], (LPCVOID)nStylePoints, sizeof(nStylePoints), NULL))
  32. std::cout << "\n Wrote Memory Successfully. \n";
  33. else
  34. {
  35. std::cout << "\n Wrote Memory UnSuccessfully. \n";
  36. std::cout << " Check the Address, also make sure you put '0x' before it. \n";
  37. }
  38. Sleep(1000);
  39. std::getchar();
  40. return 0;
  41. }
  42. }
  43. catch (const std::exception &e)
  44. {
  45. std::cout << "\n " << e.what() << ". \n ";
  46. std::getchar();
  47. return -1;
  48. }
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement