================================================ <------------------------------------------------> <------------#www.bright-shadows.net#------------> <------------------------------------------------> <--------------#theblacksheep&erik#--------------> <------------------------------------------------> ================================================ Web Bug v1.0 Author: theblacksheep + r3d5pik3 Version: 1.0 Date: August 10th 2004 Contact: webmaster@bright-shadows.net #- Introduction #- Thx! ---------------------------------------------------------------------------- --[< Introduction >] ------------------------------------------------------- ---------------------------------------------------------------------------- A Web Bug is a simple graphic on a web site or in a email that collects information about the user who is visiting the website or who is reading the email. They often say look for graphics which are 1x1 pixel big, but even a normal graphic can be a Web Bug. In this tutorial I want to show you how to create such a Web Bug. If you find any mistakes please write me an e-mail (webmaster@bright-shadows.net) and I will fix it. ---------------------------------------------------------------------------- --[< Web Bug >] ------------------------------------------------------------ ---------------------------------------------------------------------------- Things you will need: ->web hosting or your own server which allows you to use: ->.htacces files ->php scripts ->the gd library has to be installed First create a new folder. Something like "webbug/" but it can be anything. Now create a ".htaccess" file which contains the following line ForceType application/x-httpd-php and put it into the "webbug/" folder. That tells the webserver to treat everything in this folder as a php file (the extension doesn't matter). So "file1.jpg" would be treated like a php file and not like a jpg file. Now you have to put your jpg file (the one that is going to be the Web Bug later) into the "webbug/" folder. Just save it as "sigpic.jpg"; Time to open your favourite editor. Create a new file and just save it as "sig.jpg". This is the file with all the php code. It is important that you start the file off with ----------------------------------- "; $hfile = fopen("data.txt", "w+"); fwrite($hfile, $intofile); fclose($hfile); ----------------------------------- At the end just add: ----------------------------------- $BGImage = imagecreatefromjpeg("sigpic.jpg"); imagejpeg($BGImage); imagedestroy($BGImage); ?> ----------------------------------- So the image gets shown and nobody even has a clue that something else is going on in between. You can also check out "http://www.bright-shadows.net/tbs/sig/sig.jpg". This picture stores your IP, Referer and User-Agent in the file "data.txt" (just as long as nobody else looks at the picture). For a more detailed example just look at the code of r3d5pik3s dynamic sig: ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- --[< Thx! >] --------------------------------------------------------------- ---------------------------------------------------------------------------- @r3d5pik3 for the idea and for allowing me to use his code as an example