Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Written By maxbd / MaxIsBack
- #include <Windows.h>
- #include <iostream>
- typedef unsigned long dw;
- int main(int argc, char* argv[])
- {
- int nStylePoints = 710000; // --Limit, I think.
- while (true)
- {
- Sleep(10);
- try
- {
- HWND hWnd = FindWindow(NULL, "Clustertruck");
- if (!hWnd) { std::cout << "\n Couldn't Find ClusterTruck Window! \n"; std::getchar(); return -1; }
- dw pRocIDy;
- GetWindowThreadProcessId(hWnd, &pRocIDy);
- if(!pRocIDy) { std::cout << "\n Couldn't Find ClusterTruck Process! \n"; std::getchar(); return -1; }
- HANDLE hNdl = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pRocIDy);
- if (GetAsyncKeyState(VK_DELETE))
- {
- Sleep(100);
- std::cout << "\n Press Any Key To End Program. \n";
- std::getchar();
- return 0;
- }
- else if (GetAsyncKeyState(VK_F7)) // Press F7 to change style point's value.
- {
- Sleep(1000);
- if (WriteProcessMemory(hNdl, (LPVOID)argv[1], (LPCVOID)nStylePoints, sizeof(nStylePoints), NULL))
- std::cout << "\n Wrote Memory Successfully. \n";
- else
- {
- std::cout << "\n Wrote Memory UnSuccessfully. \n";
- std::cout << " Check the Address, also make sure you put '0x' before it. \n";
- }
- Sleep(1000);
- std::getchar();
- return 0;
- }
- }
- catch (const std::exception &e)
- {
- std::cout << "\n " << e.what() << ". \n ";
- std::getchar();
- return -1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement