Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Intro:
- Written by t3hmadhatt3r -- Contact: [email protected].
- Hello mates. I have been working on a method of getting IP's and other info using the GD library.
- The Code
- Ok first we will use the GD library in php to generate a valid image in php.
- ore Info about that PHP GD library at http://us2.php.net/manual/en/book.image.php
- Faking the Extension
- Now we have a valid image but, how will we get it to work on forums that dont allow php as a image extension? Well there are two ways. One which is better than the other.
- 1. .htaccess (This is the best way)
- If you are using a server that allows you to configure your own .htaccess file than you can add the following line to execute all files with the .jpg extension as a php file.
- Code:
- AddHandler application/x-httpd-php .jpg
- Note: If you dont have a server that allows this I recommend looking at http://www.free-webhosts.com/search-webh....htaccess.
- Now you can rename the php file to jpg and it will still work! Tricky Aye?
- 2. Tricky Technique (This way works just the same but is suspicious)
- This technique can be done on most servers (I tried it on t35 and got some Permission errors... Probably because of the Jail Shell) but, It could get some attention from a admin pretty quickly. Just add a /image.jpg to the end of the PHP file.
- Example:
- http://subdomain.whatever.com/script.php/image.jpg
- This will make it look like the extension is jpg but the php will ignore it and execute normally.
- .:Ending:.
- Now you can embed this image in forums just like any other image.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement