To start I don't know why but my account got reseted, anyway for the past few days I been to learn stuff about API's and I made a trainer for Pinball that makes you have unlimited balls using this code
Code:
#include <iostream>
#include <fstream>
#include <windows.h>
using namespace std;
int main()
{
HANDLE Std = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(Std, FOREGROUND_RED);
SetConsoleTitle("Zomg trainer o.0");
unsigned long PID;
DWORD Buffer = { 0x000003B8 };
HWND hWindow = FindWindow(NULL, "3D PinBall for Windows - Space Cadet");
if (!hWindow){
MessageBox(0, "Game not found!", 0, MB_ICONERROR); return 1; }
CreateRemoteThread(hWindow, NULL, 0, 0, 0, NULL, NULL);
GetWindowThreadProcessId(hWindow, &PID);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, TRUE, PID);
WriteProcessMemory(hProcess, (LPVOID)0x010175B7, &Buffer, sizeof(Buffer), 0);
CloseHandle(hProcess);
bool loop = true;
while ( loop == true ) {
int def;
cout << "Type 0 to return to default: ";
cin >> def;
cin.ignore();
if (def == 0) {
unsigned long PID;
DWORD Buffer = { 0x01468689 };
HWND hWindow = FindWindow(NULL, "3D PinBall for Windows - Space Cadet");
CreateRemoteThread(hWindow, NULL, 0, 0, 0, NULL, NULL);
GetWindowThreadProcessId(hWindow, &PID);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, TRUE, PID);
WriteProcessMemory(hProcess, (LPVOID)0x010175B7, &Buffer, sizeof(Buffer), 0);
CloseHandle(hProcess);
return 0;
}
else if ( def != 0 ) {
cout << "Incorrect input. Try again. " << endl;
loop = true;
}
}
system("pause");
return 0;
}
Now I been trying to do the same but for a game that hides it self so I can't see it in Task manager. Is there a was to target a hidden process?