Sinisterly
[PHP]Steal IP With Image - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: PHP (https://sinister.ly/Forum-PHP)
+--- Thread: [PHP]Steal IP With Image (/Thread-PHP-Steal-IP-With-Image)

Pages: 1 2


[PHP]Steal IP With Image - KaiT_AleX - 07-22-2011

With this technique, you can get IP's from forum threads, forum PM's, imageboards, emails, or basically anywhere you can show an image.
You will need an Apache server, I recommend XAMPP. Otherwise you can try it on a host. However, this technique didn't work on 000webhost (a free hosting provider).

There will be two files needed on the server. One is the PHP file and the other is the gif image. The PHP file will pretend to be the image (using image/gif header), and will log the IP and other info when the image is accessed. The PHP file will log all of this in the log.html file (which it will create).

Code:

<?php
$imageurl = "http://yourwebserver.com/image.gif";
$fp = fopen('log.html', 'a');
$ip = $_SERVER['REMOTE_ADDR'];
$agent = $_SERVER['HTTP_USER_AGENT'];
$port = $_SERVER['REMOTE_PORT'];
$file = $_SERVER['HTTP_REFERER'];
$visitTime = date("M d, h:i A");
$data =" <tr><td>$visitTime</td><td>$ip</td><td></td><td>$port";
fwrite($fp, $data);
fclose($fp);
header("content-type: image/gif");
$image = ImageCreateFromGIF($imageurl);
imagegif($image);
ImageDestroy($image);
exit();
?>


The second file will be the image. Either you can have a 1x1 blank image, or an actual image. Save it as a gif and put it in the same folder as the php file. Change the imagelink in the PHP file to point to the image.

To test if it works, create a simple html file, change the loopback to your host:

Code:

<html><body><img src="http://127.0.0.1/image.php"</img>



Now go check the log.html. If theres a record, then it works.

To get IP's from a forum, either post the image.php as a picture on a thread, or send a PM with a message like:

Code:

Code:
http://my-ip.com/image.php



To get IP's through email is a little tricky. Most online email services won't let you attach PHP images. Also, the receiver must open the email and allow the images to be shown.
The only way I made it work was through Thunderbird.

Create a new message, and click on the attach icon on the formatting bar (not the big Attach button). You'll see options to attach a Link, anchor, image etc.
- Choose Image.
- In the link, enter something like
Code:
http://my-ip.com/image.php

- uncheck "attach this image to the message"
- select "don't use alternate text"
- click OK
- Send it, and choose send as HTML


[PHP]Steal IP With Image - KaiT_AleX - 07-22-2011

With this technique, you can get IP's from forum threads, forum PM's, imageboards, emails, or basically anywhere you can show an image.
You will need an Apache server, I recommend XAMPP. Otherwise you can try it on a host. However, this technique didn't work on 000webhost (a free hosting provider).

There will be two files needed on the server. One is the PHP file and the other is the gif image. The PHP file will pretend to be the image (using image/gif header), and will log the IP and other info when the image is accessed. The PHP file will log all of this in the log.html file (which it will create).

Code:

<?php
$imageurl = "http://yourwebserver.com/image.gif";
$fp = fopen('log.html', 'a');
$ip = $_SERVER['REMOTE_ADDR'];
$agent = $_SERVER['HTTP_USER_AGENT'];
$port = $_SERVER['REMOTE_PORT'];
$file = $_SERVER['HTTP_REFERER'];
$visitTime = date("M d, h:i A");
$data =" <tr><td>$visitTime</td><td>$ip</td><td></td><td>$port";
fwrite($fp, $data);
fclose($fp);
header("content-type: image/gif");
$image = ImageCreateFromGIF($imageurl);
imagegif($image);
ImageDestroy($image);
exit();
?>


The second file will be the image. Either you can have a 1x1 blank image, or an actual image. Save it as a gif and put it in the same folder as the php file. Change the imagelink in the PHP file to point to the image.

To test if it works, create a simple html file, change the loopback to your host:

Code:

<html><body><img src="http://127.0.0.1/image.php"</img>



Now go check the log.html. If theres a record, then it works.

To get IP's from a forum, either post the image.php as a picture on a thread, or send a PM with a message like:

Code:

Code:
http://my-ip.com/image.php



To get IP's through email is a little tricky. Most online email services won't let you attach PHP images. Also, the receiver must open the email and allow the images to be shown.
The only way I made it work was through Thunderbird.

Create a new message, and click on the attach icon on the formatting bar (not the big Attach button). You'll see options to attach a Link, anchor, image etc.
- Choose Image.
- In the link, enter something like
Code:
http://my-ip.com/image.php

- uncheck "attach this image to the message"
- select "don't use alternate text"
- click OK
- Send it, and choose send as HTML


RE: [PHP]Steal IP With Image - /black-diary - 08-15-2011

nice,,,
using php GD.

like my old trick to run my bot.. Biggrin


RE: [PHP]Steal IP With Image - Clan99 - 08-24-2011

Very Nice method man I use another metohd(maybe little more complicated Wink )

1 - I make picture (well it's picture ip catcher Wink )
2 - .htaccess code
Code:
RewriteEngine on RewriteRule ^picture.jpg$ iplogger.php

3 - iplogger.php code
Code:
<?php $log = 'logger.html'; $ip = $_SERVER['REMOTE_ADDR']; $page = $_SERVER['REQUEST_URI']; $refer = $_SERVER['HTTP_REFERER']; $date_time = date("l j F Y g:ia", time() - date("Z")) ; $agent = $_SERVER['HTTP_USER_AGENT']; $fp = fopen("logger.html", "a"); fputs($fp, " <b>$date_time</b> <br> <b>IP: </b>$ip<br><b>Page: </b>$page<br><b>Refer: </b>$refer<br><b>Useragent: </b>$agent <br><br> "); flock($fp, 3); fclose($fp); ?>
4 - Empty logger.html (there will logs come)

Well my method is really old Sad maybe we could improve it Biggrin


RE: [PHP]Steal IP With Image - KaiT_AleX - 08-25-2011

Why not $log = loger.txt ?? It is more simple ! Biggrin Less memory ! Biggrin


RE: [PHP]Steal IP With Image - Ragecry - 08-29-2011

Thanks this works uber fine ;D


RE: [PHP]Steal IP With Image - Ragecry - 08-29-2011

Thanks this works uber fine ;D


RE: [PHP]Steal IP With Image - Fredjes - 04-19-2013

Thanks, I didn't even know you could do this!


RE: [PHP]Steal IP With Image - Fredjes - 04-19-2013

Thanks, I didn't even know you could do this!


RE: [PHP]Steal IP With Image - The Alchemist - 09-16-2013

(09-16-2013, 10:16 AM)Lucky97 Wrote: how to make this ?

Have you read the thread?
The thread itself answers it.