Skip to content

Comment on JavaScript Demos in 140 Charactersparent

Comments

The compression tricks used in standalone Javascript demos are significantly more cursed. The meta is to concatenate a compressed binary payload and a HTML/JS decompression stub in the same file, abusing the fact that HTML5 parsers are required to be absurdly tolerant of malformed documents. Nowadays it's done using raw DEFLATE and DecompressionStream, but before that was available they would pack the payload into the pixels of a PNG and use Canvas to extract the data.

Try saving this Normal HTML File and open it in a text/hex editor: https://0b5vr.com/domain/domain.html

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.