Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <windows.h>
- using namespace std;
- int main()
- {
- system("color 0A");
- cout << "Make sure Modern Warfare 2 is opened before pressing ENTER..." << endl;
- system("Pause");
- LPCWSTR Fuck = L"Modern Warfare 2";
- HWND hwnd = FindWindow(0, Fuck);
- if (hwnd == 0)
- {
- cout << "The game has not been found... please open it before opening the tool next time..." << endl;
- system("Pause");
- }
- else
- {
- DWORD process_ID;
- GetWindowThreadProcessId(hwnd, &process_ID);
- HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, process_ID);
- cout << "Modern Warfare 2 has been found... Enjoy the tool!" << endl;
- system("Pause");
- cout << "Type 1 for XP" << endl;
- cout << "Type : ";
- int Option;
- cin >> Option;
- if (Option > 1)
- {
- cout << "There is no option higher than 1..." << endl;
- system("Pause");
- }
- if (Option == 1)
- {
- cout << "What do you want to set your XP as?" << endl;
- cout << "Type : ";
- int XP;
- cin >> XP;
- DWORD newdatasize = sizeof(XP);
- if (WriteProcessMemory(hProcess, (LPVOID)0x01B2C89C, &XP, newdatasize, NULL))
- {
- cout << "The XP has been written sucessfully!!" << endl;
- system("Pause");
- }
- else
- {
- cout << "There was an error writing the XP..." << endl;
- system("Pause");
- }
- }
- }
- main();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment