|
Full Version: Adding Html Code To An Image?
Is it possible to add html code to an image? jpg, gif or any other.
Yap, research PHP GD library
Thanks fot the info. It looks like its only possible to add php code to an image.
To bad, I have no skills in php. What Im trying to do is making an image open another webpage.
you could also use flash
but im not sure how to do it but i think it is possible good luck
You can make HTML file, and rename it to JPG and upload.. Internet explorer checks for code in the header, not the extension.. So if you putt <HTML> on top of your .jpg file, it will treat it as a HTML file, and act acordingly..
This will popup new page.. P.S. This code won't work on SP2, because of popup blocker, but you can bypass it with an exploit that recently appeared.. I think it was malware.com or greyhatsecurity that released it.. Search and you shall find... Also, script is not tested on any other browser except IE ...picture.jpg CODE <HTML> <body onload="javascript:window.location='http://example.com/';"> </BODY> </HTML> This will popup new page, but will remain parent page(picture.jpg) opened.. You can close parent page with some advanced javascript tricks..
Also, anything you do with HTML can also be done in PHP...
Like for ex. you can refresh your script with this: <?PHP echo "<meta http-equiv=Refresh content=0;URL='htp://example.com'>"; ?> or you can include('page.php'); and include.php can contain whatever you wish... I use to screw around with GD back when I had no idea about PHP, so I don't know if all this is possible, but you can experiment..
Yes I know the trick to rename a html file to jpg.. but now I need a pure jpg file.
I am trying to figure out how to add this php code to an image using gdwin32, it's abit complicated. However.. If I succed to add the code, I guess the image file have to be located on a webserver that support php, right?
Go here if i remember correctly this is the program i used to add executable code to images
ImageHide
That is stenography.. Has nothing to do with what he wants..
eh, that shiznit ain't gonna work with anything except old old old software.
i remember there was a bitmap sploit in the last couple years that led to integer overflow or something... might try looking for that
Here is GD code for displaying IP within picture.. I havent tested it , but it should work.. NOw you can modify it to suith your needs...
CODE <?php
$string = $_SERVER['REMOTE_ADDR']; $im = imagecreatefrompng("viper.png"); $orange = imagecolorallocate($im, 220, 210, 60); $px = (imagesx($im) - 7.5 * strlen($string)) / 2; imagestring($im, 3, $px, 9, $string, $orange); imagejpeg($im); imagedestroy($im); ?>
Thanks man, I will try it !
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
|
|