Hello there, today I will show you how to code a simple script to get the remote IP address of your victim.
This script will be coded in PHP ” Hypertext Preprocessor “.
PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. Originally created by Rasmus Lerdorf in 1994
You don’t need an IDE to do this you can open a text-editor program like: Notepad on windows or leafpad, mousepad, gedit on linux.
after that type in the following code:
<?php $file = fopen("ip.txt","a"); $ip=$_SERVER['REMOTE_ADDR']; echo fwrite($file,$ip); fclose($file); ?>
Ok now let me explain this simple code for you:
<?php : is the php open tag
$file = fopen(“ip.txt”,”a”); : we declare a variable called file then we use the built in function fopen and right the name of the file that we want to append the data into it in this example its “ip.txt”.
$ip=$_SERVER[‘REMOTE_ADDR’]; : In here we declare a variable called ip to get the remote ip-address by typing $_SERVER[‘REMOTE_ADDR’];
echo fwrite($file,$ip); : in this line we echo and use the fwrite function to write the ip-address to the file.
?> At the end we close the php tag.
save the file as index.php for example and browse to https://127.0.0.1/index.php you will notice a white blank screen after that navigate to https://127.0.0.1/ip.txt you will find the ip-address logged there
*note the logged ip address will be you localhost upload this script to a free hosting and send the link to the victim and do some social enginnering to keep it cool.
** Disclaimer **
Any actions and or activities related to the material contained within this Website is solely your responsibility.The misuse of the information in this website can result in criminal charges brought against the persons in question. The authors will not be held responsible in the event any criminal charges be brought against any individuals misusing the information in this website to break the law.
This site contains materials that can be potentially damaging or dangerous. If you do not fully understand something on this site, then GO OUT OF HERE! Refer to the laws in your province/country before accessing, using,or in any other way utilizing these materials.These materials are for educational and research purposes only.Do not attempt to violate the law with anything contained here. If this is your intention, then LEAVE NOW! Neither administration of this server, the authors of this material, or anyone else affiliated in any way, is going to accept responsibility for your actions. Neither the creator is responsible for the comments posted on this website.