Computer Science Canada

Accessing ram using address

Author:  Homer_simpson [ Tue Jun 10, 2003 7:09 pm ]
Post subject:  Accessing ram using address

is anyone good at pointers in c++?!

Author:  Catalyst [ Tue Jun 10, 2003 7:32 pm ]
Post subject: 

whado you need to know

Author:  Homer_simpson [ Tue Jun 10, 2003 7:39 pm ]
Post subject: 

well ok...
this is the code that i have made
code:

#include <iostream>
#include <fstream>

using namespace std;

void main()
{
const int& addr=0x00A88084;
cout <<addr<<"\n";
} // end of main()

But, when i compile i get the address instead of the value that the address holds can u help me with that?!

Author:  Catalyst [ Tue Jun 10, 2003 7:47 pm ]
Post subject: 

is this what you are looking for?
code:

#include <iostream>
#include <fstream>

using namespace std;

int main()
{
int number=5;
int* addr=&number;

cout <<*addr<<"\n";
system ("PAUSE");
return 0;
} // end of main()

Author:  Homer_simpson [ Tue Jun 10, 2003 8:05 pm ]
Post subject: 

i know how the pointers work but this not exactly a pointer...
see 0x00A88084 is the address that the value is stored at in the memory... that's where i wanna access...

Author:  Tony [ Tue Jun 10, 2003 8:31 pm ]
Post subject: 

I think homer wants to go through his RAM stick searching for where mazer is hiding his values and change them Laughing

Author:  Catalyst [ Tue Jun 10, 2003 8:32 pm ]
Post subject: 

you could always cast it to whatever type the value is
code:

int* addr=(int*)0x00A88084;
*addr=5;

Author:  Homer_simpson [ Tue Jun 10, 2003 8:50 pm ]
Post subject: 

i have already cracked mazer's program... take a look at that screen shot.. i also hacked the ammo about an hour ago... i had more than 300 missiles Very Happy

Author:  Homer_simpson [ Tue Jun 10, 2003 8:56 pm ]
Post subject: 

this is what i get when i run your code =(
Cpp1.exe has encountered a problem and needs to close. We are sorry for the inconvenience...

Author:  Catalyst [ Tue Jun 10, 2003 9:45 pm ]
Post subject: 

i know
its prob cuz :
1) theres notihng there
2) i messed up the code

Author:  Homer_simpson [ Tue Jun 10, 2003 9:57 pm ]
Post subject: 

i believe that u messed up the code =Þ
cuz i'm positive that there's something there Very Happy

Author:  Tony [ Tue Jun 10, 2003 10:14 pm ]
Post subject: 

are you sure homer?

cuz the way I figure it... takes 2 minutes tops to unscrew computer's case, grab the ram stick and put it all back together... and it might take weeks before anyone would notice Laughing

Author:  Homer_simpson [ Tue Jun 10, 2003 10:31 pm ]
Post subject: 

heh... well i'm positive because i checked it with a memory check program... no need to open my case Laughing

Author:  Tony [ Tue Jun 10, 2003 10:46 pm ]
Post subject: 

yeah... well you would probably find out... so would I and many more users around here...

its just that me and my friend estimated that if two of us were left in computer lab for 15 minutes with 2 screwdrivers, we would get a shitload of ram for ourselves Laughing

Author:  Homer_simpson [ Tue Jun 10, 2003 10:59 pm ]
Post subject: 

heh... u must have a pretty big mother board if u wanna intsall 100s of 8 mb ram memory(our school lab's rams are 8 mb i think Very Happy)



man i have done this program b4(in Turbo Pascal)... i did it when i was 10 or 12 it worked awsome... i used to make it read all my memory(i had 8mbs) and it would give me back the usefull stuff like system codes or all the thing that had been typed programs (including passwords)in fact every thing that was declared as a variable sometime... BUT I DONT REMEMBER HOW I DID IT!!! Crying or Very sad

Author:  Tony [ Tue Jun 10, 2003 11:25 pm ]
Post subject: 

neah, I was talking about my nice P4 lab... though they still run slow. That piece of shit. If you order the newest computer you can find, by the time it will be delivered, it would become obsolite. Thats even with a "next businessday delivery" Laughing

Author:  Martin [ Wed Jun 11, 2003 4:15 pm ]
Post subject: 

'cept my computer. Zippy Very Happy

Author:  Tony [ Wed Jun 11, 2003 5:05 pm ]
Post subject: 

Darkness... we already established the fact that your processor is swimming in liquid nitrogen... dont have to rub that in Confused

Author:  rizzix [ Fri Jun 13, 2003 8:19 pm ]
Post subject: 

you can't acces raw memory locations.
Windows 2000 onwards will prevent ur application from running!!

it might work on 95/98 i don't know...


: