[HELP] Hacking with C++....

Posts 16–25 of 25 · Page 2 of 2
Quote Originally Posted by Hell_Demon View Post
A library in C++ is basicly the same as a dynamic link library(dll), but without the dynamic loading part, You link it with your program at compile time instead of using LoadLibrary at runtime.
ooookay i gotcha. thanks
Another question :X sorry bout this.

I learned that if i wanted to put the address of the variable Mpgh (integer) into a pointer, the code is:

int Mpgh = 60;
int * Mpgh_point = 0;
Mpgh_point = &Mpgh;

So now that i understand pointers and addresses and how to put the address of a variable into a pointer, i was curious as to how this would be useful if i was to try to hack?

I remember why06 saying that hacking is done by finding what accesses the addresses, and something about pointers... so even though this is the opposite of actually hacking, i figured maybe it was related.

edit: it's also just the address of my own little variable >.>
so until i actually figure out how to include the addresses of other programs into my code its a bit useless for hacking purposes :X
Its a collection of code and functions that other programs can use by linking to it either statically or dynamically. HD went over the difference between static & dynamic. Unfortunately just code, no pictures... though I like pictures too!
It's like you said it's the opposite of hacking. So in hacking we would use the same technique in reverse. All you know is that mpgh = 60.

So we would scan memory for decimal value 60.
That would return an address.
Then we would assign that address to our own pointer.

int* Mpgh = 0;
Mpgh = ScanFor(60);
*Mpgh = 30;

Now we directly changed the value to whatever we wanted. So if 60 was your hp it just became 30. Not a very smart hack, but a hack nonetheless.
Quote Originally Posted by why06 View Post
It's like you said it's the opposite of hacking. So in hacking we would use the same technique in reverse. All you know is that mpgh = 60.

So we would scan memory for decimal value 60.
That would return an address.
Then we would assign that address to our own pointer.

int* Mpgh = 0;
Mpgh = ScanFor(60);
*Mpgh = 30;

Now we directly changed the value to whatever we wanted. So if 60 was your hp it just became 30. Not a very smart hack, but a hack nonetheless.
Ohhhhh i see! so that basically does the same thing cheat engine does when it scans for addresses. im gettin a little bit too far ahead but if we were to somehow scan for the address of a value in say...CA. Like cheat engine, if we scanned for the decimal value of 60 wouldn't a bunch of different addresses pop up?
Quote Originally Posted by mookamoka3 View Post
Ohhhhh i see! so that basically does the same thing cheat engine does when it scans for addresses. im gettin a little bit too far ahead but if we were to somehow scan for the address of a value in say...CA. Like cheat engine, if we scanned for the decimal value of 60 wouldn't a bunch of different addresses pop up?
Well yeh. I simplified it a bit, there's no "ScanFor" function either, but using a program like CE you can scan for values. And yes a whole bunch of addresses which have the value 60 might show up. You'll have to filter them out by looking for things that remain the same and things that change.

For instance if you walk over to ur left in-game your position might change from 60 to 80 but your hp wont. Then you can decrease your hp by getting shot and now you search for 59 instead. There's lots of little tricks used to narrow things down to one result.
Quote Originally Posted by why06 View Post


Well yeh. I simplified it a bit, there's no "ScanFor" function either, but using a program like CE you can scan for values. And yes a whole bunch of addresses which have the value 60 might show up. You'll have to filter them out by looking for things that remain the same and things that change.

For instance if you walk over to ur left in-game your position might change from 60 to 80 but your hp wont. Then you can decrease your hp by getting shot and now you search for 59 instead. There's lots of little tricks used to narrow things down to one result.
So if i were to use cheat engine to scan for the address i want to use, how would i use that address in my code? would i just use the attach process option in visual studio, or would i still need to somehow take the address and put it in the code?
I would do the later, course there's problems with that too, but you'll find out about DMA (dynamic memory allocation) soon enough. Just search for the value and manually add the address for now.
Quote Originally Posted by why06 View Post
I would do the later, course there's problems with that too, but you'll find out about DMA (dynamic memory allocation) soon enough. Just search for the value and manually add the address for now.
alright thanks!
question #94:

The tutorial i was just looking at did a piss poor job of explaining classes...or im just too stupid to understand it. Teach Yourself C++ in 21 Days

So my question is basically what's the point of making a class... from what i saw the same thing could be accomplished a shit load easier without the complications.

Also could you explain what accessor methods are? :x

From what i gathered theyre just different ways of accessing private variables or functions outside of a class, but im not quite sure.

thanks
Posts 16–25 of 25 · Page 2 of 2

Post a Reply

Tags for this Thread

None

Talk with us