Author |
Message |
Homer_simpson
|
Posted: Tue Jun 10, 2003 7:09 pm Post subject: Accessing ram using address |
|
|
is anyone good at pointers in c++?! |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Catalyst
|
Posted: Tue Jun 10, 2003 7:32 pm Post subject: (No subject) |
|
|
whado you need to know |
|
|
|
|
|
Homer_simpson
|
Posted: Tue Jun 10, 2003 7:39 pm Post subject: (No 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?! |
|
|
|
|
|
Catalyst
|
Posted: Tue Jun 10, 2003 7:47 pm Post subject: (No 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() |
|
|
|
|
|
|
Homer_simpson
|
Posted: Tue Jun 10, 2003 8:05 pm Post subject: (No 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... |
|
|
|
|
|
Tony
|
Posted: Tue Jun 10, 2003 8:31 pm Post subject: (No subject) |
|
|
I think homer wants to go through his RAM stick searching for where mazer is hiding his values and change them |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Catalyst
|
Posted: Tue Jun 10, 2003 8:32 pm Post subject: (No subject) |
|
|
you could always cast it to whatever type the value is
code: |
int* addr=(int*)0x00A88084;
*addr=5;
|
|
|
|
|
|
|
Homer_simpson
|
Posted: Tue Jun 10, 2003 8:50 pm Post subject: (No 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 |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Homer_simpson
|
Posted: Tue Jun 10, 2003 8:56 pm Post subject: (No 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... |
|
|
|
|
|
Catalyst
|
Posted: Tue Jun 10, 2003 9:45 pm Post subject: (No subject) |
|
|
i know
its prob cuz :
1) theres notihng there
2) i messed up the code |
|
|
|
|
|
Homer_simpson
|
Posted: Tue Jun 10, 2003 9:57 pm Post subject: (No subject) |
|
|
i believe that u messed up the code =Þ
cuz i'm positive that there's something there |
|
|
|
|
|
Tony
|
Posted: Tue Jun 10, 2003 10:14 pm Post subject: (No 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 |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Homer_simpson
|
Posted: Tue Jun 10, 2003 10:31 pm Post subject: (No subject) |
|
|
heh... well i'm positive because i checked it with a memory check program... no need to open my case |
|
|
|
|
|
Tony
|
Posted: Tue Jun 10, 2003 10:46 pm Post subject: (No 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 |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Homer_simpson
|
Posted: Tue Jun 10, 2003 10:59 pm Post subject: (No 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 )
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!!! |
|
|
|
|
|
|