| | |
C++ trainer coding
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
Prabakar, a trainer is something that lets you cheat on games. They can give you like infinite money and health and stuff.
hdan, to get a variables address in your own program do this:
I have tried to do the same thing in the past. Here's the code. You need the text of the window for the program to cheat on.
hdan, to get a variables address in your own program do this:
C++ Syntax (Toggle Plain Text)
#include <iostream> #include <ostream> #include <ios> using namespace std; int main() { int n; n = 1; cout << &n; cin.get(); return 0; }
I have tried to do the same thing in the past. Here's the code. You need the text of the window for the program to cheat on.
C++ Syntax (Toggle Plain Text)
#include <stdio.h> #include <conio.h> #include <windows.h> #include <iostream> using namespace std; int Memory(char Caption[], int long Address, int Value, bool _w) { DWORD PROC_ID; HANDLE PROC_HANDLE; GetWindowThreadProcessId(FindWindow(NULL, (LPCTSTR)Caption), &PROC_ID); PROC_HANDLE = OpenProcess(PROCESS_ALL_ACCESS, false, PROC_ID); if(_w) WriteProcessMemory(PROC_HANDLE, (LPVOID)Address, &Value, sizeof(long int), NULL); else ReadProcessMemory(PROC_HANDLE, (LPVOID)Address, &Value, sizeof(long int), NULL); CloseHandle(PROC_HANDLE); return Value; } int main() { SetConsoleTitle("EditMemory"); char Caption[1000]; cout << "Enter the caption: "; cin.getline(Caption, 1000); HWND Test = FindWindow(NULL, Caption); if (!Test) { cout << "\nCannot find window \"" << Caption << "\"!"; cin.get(); return 0; } LPVOID Address; cout << "\nEnter the address: "; cin >> Address; int Value; cout << "\nEnter the value to write: "; cin >> Value; bool _w; char aChar[100]; cout << "\nEnter 'w' to write, or 'r' to read: "; cin >> aChar; switch (aChar[0]) { case 'w': _w = true; break; case 'r': _w = false; break; default: cout << "\nYou didn't enter 'w' or 'r'!"; cin.ignore(); cin.get(); return 0; break; } cout << "\nThe value is: " << Memory(Caption, (int long)Address, Value, _w); cin.ignore(); while (getch() != 'q') { Sleep(10); } return 0; }
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."
--Martin Golding
--Martin Golding
I have to give the credit to the guy who posted this though: http://otfans.net/archive/index.php?t-21886.html.
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."
--Martin Golding
--Martin Golding
•
•
Join Date: Apr 2008
Posts: 129
Reputation:
Solved Threads: 22
so if you have address of int - you can try this 

cpp Syntax (Toggle Plain Text)
int * money = (int*)0x7ffd8000; *money = 666;
•
•
•
•
so if you have address of int - you can try this
cpp Syntax (Toggle Plain Text)
int * money = (int*)0x7ffd8000; *money = 666;
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- C/Stratus Developer (Software Development Job Offers)
Other Threads in the C++ Forum
- Previous Thread: LinkedLists problem
- Next Thread: Setting array in contructor
| Thread Tools | Search this Thread |
api array arrays based binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






