Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Assault cube exploit by Nexobeta28. 2019. Word#5273
- //IMPORTS
- #include<iostream>
- #include<Windows.h>
- using namespace std;
- int main()
- {
- //ADDRESSES
- DWORD baseAddress = 0x00509C6C;
- DWORD healthAddress = 0x00E7A838; //off F8
- DWORD mtp57_ammoAddress = 0xE7A890; //off 150
- DWORD mk77_ammoAddress = 0x00DBA87C; //off 13C
- DWORD armorAdress = 0x00DBA83C; //off ?
- HWND hwnd = FindWindowA(NULL, "AssaultCube"); //Get assault cube window. HWND is a data type that stores Windows.
- if (hwnd == NULL)
- {
- cout << "[ERROR]: Cannot find AssaultCube window." << endl;
- Sleep(5000);
- exit(-1);
- }
- else
- {
- DWORD procID; //DWORD is a data type used to store hex addreses. procId is the process ID of AssaultCube.
- GetWindowThreadProcessId(hwnd, &procID); //Hook process. With & we are referencing the actual process ID (hwnd ID).
- HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID); //Open process
- if (procID == NULL)
- {
- cout << "[ERROR]: Cannot find AssaultCube process ID." << endl;
- Sleep(5000);
- exit(-1);
- }
- else
- {
- while (TRUE)
- {
- int option;
- int value;
- cout << "[1] Change health value" << endl;
- cout << "[2] Change MTP-57 ammo value" << endl;
- cout << "[3] Change MK-77 ammo value" << endl;
- cout << "[4] Change armor value (max 100)" << endl << endl;
- cout << "Option number: ";
- cin >> option;
- switch (option)
- {
- case 1:
- int healthValue;
- cout << "New health value: ";
- cin >> value;
- WriteProcessMemory(handle, (LPVOID)healthAddress, &value, sizeof(value), 0);
- break;
- case 2:
- cout << "New MTP-57 ammo value: ";
- cin >> value;
- WriteProcessMemory(handle, (LPVOID)mtp57_ammoAddress, &value, sizeof(value), 0);
- break;
- case 3:
- cout << "New MK-77 ammo value: ";
- cin >> value;
- WriteProcessMemory(handle, (LPVOID)mk77_ammoAddress, &value, sizeof(value), 0);
- break;
- case 4:
- cout << "New armor value: ";
- cin >> value;
- WriteProcessMemory(handle, (LPVOID)armorAdress, &value, sizeof(value), 0);
- break;
- default:
- cout << "Enter a valid option!";
- Sleep(3000);
- break;
- }
- system("cls");
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment