A PNG that's interpreted as HTML and loads itself as compressed JavaScript!
A file that's both an acceptable HTML page and a JPEG (view source on it)
11–20 of 133 posts
Re: A file that's both an acceptable HTML page and a JPEG (view source on it)
#12Re: A file that's both an acceptable HTML page and a JPEG (view source on it)
#13I guess the HTML renderer skips the JPEG information and the image renderer skips the HTML information. Smart!
body { visibility: hidden; } .n { visibility: visible; position: absolute; padding: 0 1ex 0 1ex; margin: 0; top: 0; left: 0; }
the html portion comments the remaining part of the data with <!--
Re: A file that's both an acceptable HTML page and a JPEG (view source on it)
#14Earlier quoted context omitted.
view source shows that he has an html document embedded in the jpeg. Apparently, the jpeg format allows this.
The HTML document is in the "comment" field of the JPEG, which is perfectly reasonable. What is surprising is that web browsers just ignore the 24 bytes of binary data between the start of the file and the start of the HTML.
Re: A file that's both an acceptable HTML page and a JPEG (view source on it)
#15If you think that's cool, look at Daeken's Magister: http://demoseen.com/windowpane/magister.png.html A PNG that's interpreted as HTML and loads itself as compressed JavaScript!
Re: A file that's both an acceptable HTML page and a JPEG (view source on it)
#16If you think that's cool, look at Daeken's Magister: http://demoseen.com/windowpane/magister.png.html A PNG that's interpreted as HTML and loads itself as compressed JavaScript!
Re: A file that's both an acceptable HTML page and a JPEG (view source on it)
#17 $ gm convert http://lcamtuf.coredump.cx/squirrel/ -comment '' x.jpg
…and… $ gm identify -format '%c' http://lcamtuf.coredump.cx/squirrel/Re: A file that's both an acceptable HTML page and a JPEG (view source on it)
#18If you think that's cool, look at Daeken's Magister: http://demoseen.com/windowpane/magister.png.html A PNG that's interpreted as HTML and loads itself as compressed JavaScript!
Another one is Matraka: http://www.p01.org/releases/MATRAKA/matraka.png.html
Edit: It also won a much-deserved first place in the DemoJS 1k compo.