in EG4 there was a realistic mission with a tutorial on how to show the ip on screen in the browser. i cant find the right code for it on google. can someone pls send me the code for it? i want that people think that i h4x0r3D them. no just kidding, there is an idiot who thinks he is safe and i want to show him how easy it is to get his ip
Well here's the php to get their ip address:
* The REMOTE_ values are guaranteed to be the valid address of the client, as verified by a TCP/IP handshake. This is the address where any response will be sent to. This value may be "wrong" if they are using a proxy or vpn.
I'll leave this here too: http://security.stackexchange.com/questions/32299/is-server-a-safe-source-of-data-in-php
p.s. the php code hosted so you can see it works:
p.p.s There may be a better method that I'm unaware of (im pretty newish to php) so feel free to correct me if anyone has a better method :)
Just a heads up on this part
"there is an idiot who thinks he is safe and i want to show him how easy it is to get his ip"
Knowing someone's IP address isn't exactly super useful. I mean sure you can geolocate them to a certain accuracy but people knowing my ip address doesn't mean I'm not safe. In general people don't want to disclose their ip address due to their activity hence the use of VPN's etc but knowing someone's ip address doesn't mean theyre not safe. I would say it's more a hiding from authorities thing.
ps The more experienced people on this site feel free to correct me if im wrong :)
Ok i think a bit more info is needed :D On a site there was a post about some assholes stealing bikes and someone said "police gonna find your ip adress and will fuck you" and a replie was that the police can't get someones ip. i wanted to show him that EVERYONE can get his ip. so it was all about geolocating someone.
But one thing about knowing someones ip is good: if you can get access to their network you can get access to their system with ssh.
An IP address is not a Social Security number or a fingerprint.
It, in the words of Judge Gary Brown of the U.S. District Court for the Eastern District of New York
"provides only the location at which one of any number of computer devices may be deployed, much like a telephone number can be used for any number of telephones."
Means, they cant say "this ip belongs to john doe, lets arrest him for blah"
All they can do is sieze equipment and look for evidence there, at which point, they can in fact tie the evidence to you.
Although theres another law that states, for national security reasons, they can detain that person if they are a suspected terrorists or anarchists without evidence, without reason, and for any peroid of time.
Theres always a loophole, but they wont use it over some bull shit. Perhaps your friend knows this, and therefor comes off as cocky.
id also like to point out to Galagatron
<? for php tags == no
most php configurations wont even parse it anymore. you have to enable short tags.
Always use <?php to start with unless its absolutely necessary to not.
Oh yeah, sorry that was me being lazy. I normally use the <?php. I just noticed the other day that <? worked on my server so I assumed it was just shorthand and started using it although thanks for the info. I wasn't aware that most configs wouldnt parse it. Also out of curiousity, when would it be necessary to not use <?php..
[blockquote][b]psychomarine said:[/b] Perhaps your friend knows this, and therefor comes off as cocky.[/blockquote]
Nha he is not a friend. But the thing is: even if the police wont do anything there are people like us. i dont learn to hack because im a dude who thinks he can hack a bank and get millions of dollars, i learn to hack for helping people.
at least this is why I want and do learn hacking.
Heck egv4 we could hide a line of code that would appear as something. When people would visit that post or profile, it would send out your IP.. If somebody really wants it, they can get it.