5 ms·
It's a JPEG with the HTML written in the comment field: # exiftool -b -comment <(curl -s http://lcamtuf.coredump.cx/squirrel/) <html><body><style>body { vi
by cryptonaut 8y ago
It's a JPEG with the HTML written in the comment field:
# exiftool -b -comment <(curl -s http://lcamtuf.coredump.cx/squirrel/)
<html><body><style>body { visibility: hidden; } .n { visibility: visible; position: absolute; padding: 0 1ex 0 1ex; margin: 0; top: 0; left: 0; } h1 { margin-top: 0.4ex; margin-bottom: 0.8ex; }</style><div class=n><h1><i>Hello, squirrel fans!</i></h1>This is an embedded landing page for an image. You can link to this URL and get the HTML document you are viewing right now (soon to include essential squirrel facts); or embed the exact same URL as an image on your own squirrel-themed page:<p><xmp><a href="http://lcamtuf.coredump.cx/squirrel/">Click here!</a></xmp><xmp><img src="http://lcamtuf.coredump.cx/squirrel/"></xmp><p>No server-side hacks involved - the magic happens in your browser. Let's try embedding the current page as an image right now (INCEPTION!):<p><img src="#" style="border: 1px solid crimson"><p>Pretty radical, eh? Send money to: lcamtuf@coredump.cx<!--
- mikeryan 8y agoIt also uses an (non terminated - AFAICT) HTML Comment to hide the rest of the JPEG data.
- anonymfus 8y agoYes but it is not necessary because everything except absolutely positioned div is hidden anyway.
- saagarjha 8y ago> non terminated - AFAICT Yes, it shows up as all green in Safari. And: $ { curl -s http://lcamtuf.coredump.cx/squirrel/?1 | grep -- '-->' ; } || echo "Not found" Not found
- saagarjha 8y agoI suspected it was something like that: the "meat" of the HTML and JPEG data being contained in each other's comment fields, since that's how many quines work. I don't quite know enough about the JPEG file format to be confident about it, though.
- MapleWalnut 8y agoHere is the output from the handy `file` BSD utility which gave it away to me (see the comment field). JPEG image data, JFIF standard 1.01, resolution (DPI), density 300x300, segment length 16, comment: "<html><body><style>body { visibility: hidden; } .n { visibility: visible; position: absolute; ", baseline, precision 8, 1000x667, frames 3