Live data from Hacker News

A file that’s both an acceptable HTML page and a JPEG (2012)

lcamtuf.coredump.cx

61–70 of 72 posts

Re: A file that’s both an acceptable HTML page and a JPEG (2012)

#61
post #31

Cool, but it's a chipmunk not a squirrel. Just saying!

Hey - I'm the author of that page. Your comment is a common misconception, but the animal pictured is actually a golden-mantled ground squirrel. You can tell because the stripe doesn't extend to the eye. Thank you for subscribing to squirrel facts!

Oh! You're right. Confused him with an Eastern Chipmunk.

Re: A file that’s both an acceptable HTML page and a JPEG (2012)

#62

Earlier quoted context omitted.

$ curl -s http://lcamtuf.coredump.cx/squirrel/ | file - /dev/stdin: JPEG image data, JFIF standard 1.01, resolution (DPI), density 300x300, segment length 16, comment: " body { visibility: hidden; } .n { visibility: visible; position: absolute; ", baseline, precision 8, 1000x667, frames 3 file(1) version 5.32-2ubuntu0.1.

file knows...

/dev/stdin: JPEG image data, JFIF standard 1.01, resolution (DPI), density 300x300, segment length 16, comment: "body { visibility: hidden; } .n { visibility: visible; position: absolute; ", baseline, precision 8, 1000x667, frames 3

so you get even more details...

Re: A file that’s both an acceptable HTML page and a JPEG (2012)

#63
The best example/explanation of a polyglot I ever found is in this "pocorgtfo" file [2015] (12 MB PDF but not only):

https://www.alchemistowl.org/pocorgtfo/

https://www.alchemistowl.org/pocorgtfo/pocorgtfo07.pdf

6 Abusing file formats; or, Corkami, the Novella by Ange Albertini

And more example/pocs:

https://code.google.com/archive/p/corkami/

https://github.com/corkami

Re: A file that’s both an acceptable HTML page and a JPEG (2012)

#64
post #37
post #35

Earlier quoted context omitted.

While definitely cool, I wonder how effective this is. Code/random binary data should have different characteristics than image data.

It's very effective, because it means you get a really good compression algorithm for free (because it's already there in the browser). You definitely won't save enough bytes with better input heuristics than the amount of code needed to decompress them if you're only working with 13Kb of data.

You really save bytes even though you need to include it as a base64 url?

Re: A file that’s both an acceptable HTML page and a JPEG (2012)

#65
post #31

Cool, but it's a chipmunk not a squirrel. Just saying!

Hey - I'm the author of that page. Your comment is a common misconception, but the animal pictured is actually a golden-mantled ground squirrel. You can tell because the stripe doesn't extend to the eye. Thank you for subscribing to squirrel facts!

I can attest to the veracity of your claims. :-) [0]

[0] https://news.ycombinator.com/item?id=12264275

Re: A file that’s both an acceptable HTML page and a JPEG (2012)

#67
post #64
post #37

Earlier quoted context omitted.

It's very effective, because it means you get a really good compression algorithm for free (because it's already there in the browser). You definitely won't save enough bytes with better input heuristics than the amount of code needed to decompress them if you're only working with 13Kb of data.

You really save bytes even though you need to include it as a base64 url?

[deleted]

Re: A file that’s both an acceptable HTML page and a JPEG (2012)

#68
post #64
post #37

Earlier quoted context omitted.

It's very effective, because it means you get a really good compression algorithm for free (because it's already there in the browser). You definitely won't save enough bytes with better input heuristics than the amount of code needed to decompress them if you're only working with 13Kb of data.

You really save bytes even though you need to include it as a base64 url?

It is not a base64 url, is base64 image data.

Re: A file that’s both an acceptable HTML page and a JPEG (2012)

#70
post #25
post #15

Found the real gold: http://lcamtuf.coredump.cx/prep/

This links to a detailed article titled "Doomsday planning for less crazy folk". Should I try loading it as JS? :)

No, nothing special tech-wise, but very sane content about disaster planning!
Post reply on HN