Live data from Hacker News

This JPEG is also a webpage

lcamtuf.coredump.cx

191–200 of 236 posts

Re: This JPEG is also a webpage

#191
post #58

You can see this in action for yourself on a unix cli: $ curl -o squirrel.html http://lcamtuf.coredump.cx/squirrel/ $ file squirrel.html squirrel.html: JPEG image data, JFIF standard 1.01, comment: " body { visibility: hidden; } .n { visibilit" Open the file in a browser and read the page. Then: $ mv squirrel.html squirrel.jpg Open the renamed file in a browser and only the image appears. I'm not sure what the securi…

file -k may give different results, but binwalk [0] is probably a better choice

[0]: http://binwalk.org/

Re: This JPEG is also a webpage

#192
Nice trick! I'm interested in encoding other kinds of data in images in order to share apps/music/etc between mobile devices.

Unfortunately, your HTML gets lost I try to save the picture on my phone.

iPhone > Safari > Save to Camera Roll

Copy off the picture; it's been re-encoded and has no JPG comment field.

Any solutions to this are welcome! The re-encoding makes patterns impossible to decode as well (they degrade after being shared a couple of times). See Cemetech's jsTified emulator for an example of a ROM file as a JPG - he uses B/W and it still requires the file to be synced from a computer, not saved from the browser.

Re: This JPEG is also a webpage

#193

You could do the same thing with a .wav file, embedding the HTML after the data sub-chunk. Adobe Audition uses this method to embed application-specific metadata for the file (marker and sub-marker locations, for example).

WAV is actually a specialization of an old container format called RIFF. RIFF allows for extensibility by allowing the embedding of arbitrary data. So this is technically a legitimate use of RIFF because it's designed to support multi-purpose contents, not just PCM data.

Aha! This is how Beatport were putting title/artist data in WAVs.

I'm not sure why they did that instead of just sending FLACs, though...

Re: This JPEG is also a webpage

#194
post #120
post #112

Earlier quoted context omitted.

We detached this comment from https://news.ycombinator.com/item?id=12262995 and marked it off-topic.

Why? I mean as if the parent was on topic... and this is a little joke, jokes don't kill.

There's low tolerance for jokes on HackerNews. I'm not entirely sure why, but it is what it is.

Re: This JPEG is also a webpage

#196
post #131

Earlier quoted context omitted.

Also because all of the tooling was terrible and extensibility was non-existent. It's easy to imagine a world where XHTML worked out better because the browsers provided clear, informative errors rather than a blank page, someone at the W3C cared enough to have a usable validator which produced helpful warnings and errors, and attention was paid to the less friendly bits of the XML ecosystem[1]. Instead, it felt like…

Writing proper XML tools is very difficult. XMLs are usually parsed without considering the dtd. It seems the dtds are just for humans to read. As you mention, XML becomes more interesting with extensibility. IMHO XSLT is the key technology for that but unfortunately there is no reasonable support for XSLT 2 because the standard is just too complex. And XSLT 1 is barely interesting to use. By the way, there's SLAX, i…

The main lesson I've learned from this is that a spec is far more likely to be successful if it's paired with at least one working implementation and more than trivial test data. Writing a validator is both important for adoption and perhaps more so for flushing out parts of the spec which are too hard to implement or annoying to work with.

Re: This JPEG is also a webpage

#197

This site uses the xmp tag (deprecated in HTML 3.2, removed in HTML5) which I found interesting and had never seen! https://developer.mozilla.org/en-US/docs/Web/HTML/Element/xm... It's similar to the pre tag but doesn't require the escaping. I guess you just have to make sure you don't have a closing xmp tag :)

I use for debugging purposes all the time.

Re: This JPEG is also a webpage

#200
post #162

Earlier quoted context omitted.

Same here with file(1) version 5.22 from the Debian jessie package repo. I'd be interested to know in which versions this kind of thing actually works.

My first guess would be "the MacOS one", since from what I have heard, MacOS tends to have older (sometimes much older) versions of basic system utilities. I don't have a MacOS machine nearby to check, so this is just a guess.

Well that and they have BSD rather than GNU versions
Post reply on HN