Live data from Hacker News

I Stored a Website in a Favicon

timwehrle.de

11–20 of 120 posts

Re: I Stored a Website in a Favicon

#13
post #7

Instead of going via pixels, why not use a SVG favicon and directly store markup inside it and extract it? Use this favicon.svg: hello HN! use this in your to use a svg favicon: finally, use this in your to extract it and add it to your document body: fetch(favicon.href).then(r => r.text()).then(t => document.body.innerHTML += t.match(/ /)[0]);

Hey, yeah, I wrote the article. This (of course) would be more practical. Thanks for pointing it out. I wanted the payload to "live" in actual pixel data rather than hidden text inside an XML file. That’s why I went this way :)

Re: I Stored a Website in a Favicon

#16
post #13
post #7

Instead of going via pixels, why not use a SVG favicon and directly store markup inside it and extract it? Use this favicon.svg: hello HN! use this in your to use a svg favicon: finally, use this in your to extract it and add it to your document body: fetch(favicon.href).then(r => r.text()).then(t => document.body.innerHTML += t.match(/ /)[0]);

Hey, yeah, I wrote the article. This (of course) would be more practical. Thanks for pointing it out. I wanted the payload to "live" in actual pixel data rather than hidden text inside an XML file. That’s why I went this way :)

The ico file format allows multiple resolution icons, so a lot of data

Re: I Stored a Website in a Favicon

#18
post #13

Earlier quoted context omitted.

Hey, yeah, I wrote the article. This (of course) would be more practical. Thanks for pointing it out. I wanted the payload to "live" in actual pixel data rather than hidden text inside an XML file. That’s why I went this way :)

The ico file format allows multiple resolution icons, so a lot of data

Good point, I might add a section in the article where I list alternative approaches. Thanks
Post reply on HN