So far, i have give some third party websites to track ip address of victim. Today we are going to create our own website or webpage to track victim IP address. I have written this PHP code for you.
Let me explain in two different methods
Log ip and redirect to some other interesting webpage(like “cute kittens pictures” page) or trusted page (like “facebook” page).
Log the ip and remains in same page( without redirection). I think “you won’t select this method.
In this post , i will explain the method 1.
Any free hosting site and basic knowledge about file uploading to hosting.
url shortening sites account like co.cc,co.nr[optional]
Method 1-IP log php code:
Create account in any free web hosting service.
Open notepad++ or notepad (if you have notepadd++, it will better to edit).
Paste the following code:
and save it as index.php
If you don’t want to know how it is logging the IP, you can skip to the step 3.
header(“Location:index1.php”); this will redirect to index1.php page.
You can specify any other location instead. For example, if you want to redirect to http://www.interestingwebsite.com ,then change the code as
$f=fopen($file,’a’); opens the file iplog.txt in append mode( add the contents at the end of file)and store the pointer in variable f.
fwrite($f,string) will write the string into the file(iplog.txt) for example, if the string is “hello”, it will be stored inside iplog.txt file.
so fwrite($f,”————————-“.”n”); will insert ———– inside the iplog.txt
here $_SERVER[‘REMOTE_ADDR’] is build function ,returns IP address(if you run locally in your pc using wamp/xampp, it will return 127.0.0.1). So after ———- lines, the “Ip address:127.0.0.1” will be append.
Now the iplog.txt file contains:
IP Address: 127.0.0.1
$_SERVER[‘HTTP_USER_AGENT’] returns the current user agent used by victim. It will contains information about the browser details(mozilla 3.6,ie),operating system(xp,linux).
php_uname(‘n’) returns the Host name . Now the iplog.txt contains
IP Address: 127.0.0.1
User Agent: Mozilla (linux) (ubuntu 11.10) Mozilla3.6
fclose($f); will close the opened file.
Open notepad and save the file as “iplog.txt”
again open the notepad and create your own php or html page. It should be some interesting contents(download any website templates,rename the index.html file to index1.html).
save the file as index1.html.
save the file as index1.php
Now you have 3 files namely index.php,index1.php,iplog.txt.
Upload these files to your hosting.
File uploaded to hosting account
set iplog.txt permisson to read and write by global.
Set file permission for iplog.txt
Check whether it is working or not by visiting the your hosting sub domain account.
if you enter the url, it will redirect from index.php to index1.php.
Now open the iplog.txt. There you can see the logged information.
Send to your friend or victim with attractive mail content and title. At the end, ask him to visit the link to know more about the info.
Redirected to index1.php
Logged Details ,stored in iplog.txt file
Once he visit the link, his IP address is in your hands.