-
Acessing specific adress
k I was just wondering, u know a memmory location of an item could be a value from a diffirent program like a game or something is it possible to acces that value and change the value. Thanks that be awsome and is there a way u can hook onto windows programs thanks :).
-
Windows won't let you touch other app's virtual memory. If you want to hack a game, use a pre-made hack or open the executable file into an hex editor. I'm not suggesting you to do so because a) it sucks to cheat and b) it's illegal if I recall.
-
i dun think it is illigal for first well as long as it is not an online game, and i know people make it somehow, u can find some trainers for anygame and i wanted to know how to make it but for start i would like to know how to acces some memmory location and play with it.
-
Under windows, you use WriteProcessMemory() and ReadProcessMemory() to modify or read a applications memory. Here's a snippet of some code from an old trainer I made for Battlefield 1942:
Code:
HWND hGameWin;
DWORD pid;
HANDLE hProcess;
hGameWin = FindWindow( NULL, "BF1942 (Ver:62733/10/14/2003, 11:14)" );
if (!hGameWin) return FALSE;
if (!GetWindowThreadProcessId( hGameWin, &pid )) return FALSE;
hProcess = OpenProcess( PROCESS_ALL_ACCESS, 0, pid);
if (!hProcess) return FALSE;
WriteProcessMemory( hProcess, (LPVOID)0x42AFE9, &maphack1, sizeof(maphack1), NULL );
WriteProcessMemory( hProcess, (LPVOID)0x42AA60, &maphack2, sizeof(maphack2), NULL );
WriteProcessMemory( hProcess, (LPVOID)0x42B1CA, &maphack3, sizeof(maphack3), NULL );
CloseHandle( hProcess );
Earlier in the code, the maphack arrays are defined like this:
Code:
UCHAR maphack1[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
UCHAR maphack2[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
UCHAR maphack3[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
So basically, I'm overwriting the original code with a bunch of NOP (0x90) instructions to the addresses 0x42AFE9, 0x42AA60, and 0x42B1CA. To figure out these addresses, I used a program called TSearch.
-
what library u need to include lol and i used a software called cheat engine and for example it has debugging options and u can set flags ro like eax and staff any good tuts on that?
-
Just #include <windows.h> and it should work (assuming you create a complete window or console app first though). I've never used any program called cheat engine, so I can't help you with that. I know there's quite a few tutorials on using TSearch though if you ever decided to try that out.
-
yah i know tsearch and staff but in the cheat engine u go into debuggin option and u get to adress and then u can set flags and the flags include eax then u can tick zf and staff like that wich i think is assembly but it ok i use google for that.
-
Using something like cheat engine has nothing to do with c++ programming.
-
I know i know but that option is related to asembly and wanted to know what it does but i said google will do thanks guys all question answered
-
Yea, this whole thread is off-topic, so hopefuly an admin moves it (maybe to the windows programming board).
Try these forums if you want help with the things you're asking though:
http://www.unknowncheats.com/forum/
http://www.mpcforum.com/
-
Thanks man And yes it kinda went off topic well like i said thanks a lot this thought me a lot