Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gildas
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
gildas
2y ago
One doesn't preclude the other, but I have serious doubts about free speech concerns. There are moderate and extreme movements in Europe. They all express themselves freely within the law.
32.
▲
by
gildas
2y ago
I must admit I'm a little disappointed that the bot isn't able to do this. It would be much more efficient.
33.
▲
by
gildas
2y ago
No T-spins [1], impressive! [1] https://harddrop.com/wiki/T-Spin_Guide
34.
▲
by
gildas
2y ago
I think there's been a misunderstanding, there was an error in the article suggesting that zip.min.js is not inlined in the page. This error has been corrected meanwhile. I'm sorry for that. The goal is obviously to create pages t
35.
▲
by
gildas
2y ago
A <noscript> script would be even more suitable, but I agree with the principle. I added a link to view the demo without downloading the file, see https://gildas-lormeau.github.io/Polyglot-HTML-ZIP-PNG/demo.... (
36.
▲
by
gildas
2y ago
For the record, I've just added a link to view the file without downloading it.
37.
▲
by
gildas
2y ago
That was just an example of syntax, nothing prevents you from blocking more resources and sandbox the page.
38.
▲
by
gildas
2y ago
Thanks, it was an error on my part, now corrected.
39.
▲
by
gildas
2y ago
This is done on purpose, so you can rename the file to make sure it's polyglot.
40.
▲
by
gildas
2y ago
Indeed, for example the HTML of the files used for the presentation slides [1] use <noframe> tags to keep the HTML well-formed. This point is addressed in the conclusion of the presentation. [1] https://github.com/gild
41.
▲
by
gildas
2y ago
The request will be blocked by the CSP.
42.
▲
by
gildas
2y ago
Here is the demo file (cf. the first paragraph and the end of the article): https://github.com/gildas-lormeau/Polyglot-HTML-ZIP-PNG/raw/...
43.
▲
by
gildas
2y ago
Note that if you're on iOS, it's possible that the HTML page doesn't work at all because when it's opened from the filesystem, it's displayed by a viewer which doesn't support JS instead of Safari.
44.
▲
by
gildas
2y ago
It's possible to define the Content Security Policy with a <META> tag in the "bootstrap page" and prevent this kind of security issue, e.g. <META http-equiv="content-security-policy" content="connect-s
45.
▲
by
gildas
2y ago
You're right, SingleFile (which is capable of saving pages in this format) does a little better than the demo, but it can also be optimized. In fact, I chose the JSON format to keep things as simple and didactic as possible for the pre
46.
▲
by
gildas
2y ago
Note that you can also take advantage of the fact that a ZIP can be password-protected and make your web page secret! For example https://gildas-lormeau.github.io/private/ (password: "thisisapage").
47.
▲
How to Create HTML/ZIP/PNG Polyglot Files
(gildas-lormeau.github.io)
106 points
by
gildas
2y ago
|
37 comments
48.
▲
by
gildas
2y ago
SingleFile respects your privacy, you can find the privacy policy here [1]. [1] https://github.com/gildas-lormeau/SingleFile/blob/master/pri...
49.
▲
by
gildas
2y ago
I agree that it's debatable, which is why I used the word “almost” ;). The fact remains that this info isn't in RFCs and is hard to find on the web.
50.
▲
by
gildas
2y ago
The saved page is encoded in windows-1252. It includes "consolidation data" to read the ZIP data as text from the DOM and recover the replacements of \r and \r\n occurrences (this is the only data loss and it represents approx. 1%
51.
▲
by
gildas
2y ago
I took another approach in SingleFile by offering a way to save pages as self-extracting pages (i.e. ZIP/HTML polyglot files), see [1] for more info. [1] https://github.com/gildas-lormeau/Polyglot-HTML-ZIP-PNG
52.
▲
by
gildas
2y ago
I'm actually referring to the "set of modifications" described here [1] and the fact that only Chromium can open (these) MHTML files today. [1] https://docs.google.com/document/d/1FvmYUC0S0BkdkR7wZsg
53.
▲
by
gildas
2y ago
Because the MHTML format produced by Chromium can almost be considered as proprietary.
54.
▲
by
gildas
2y ago
See https://github.com/gildas-lormeau/SingleFile/blob/master/faq...
55.
▲
Show HN: HTML Meets Zip Meets PNG: When Files Have More Layers Than an Onion
(gildas-lormeau.github.io)
3 points
by
gildas
2y ago
|
2 comments
56.
▲
by
gildas
2y ago
Thank you so much Niki :). The P2P sharing is a great idea. I really hope this feature will get things moving in the archiving field.
57.
▲
by
gildas
2y ago
In the same vein, you can package HTML pages as self-extracting ZIP files with SingleFile [1]. You can even include a PNG image to produce files compatible with HTML, ZIP and PNG [2], and for example display the PNG image in the HTML page [
58.
▲
Show HN: Create HTML/Zip/PNG Polyglot Files in JavaScript (Web Presentation)
(gildas-lormeau.github.io)
2 points
by
gildas
2y ago
|
0 comments
59.
▲
by
gildas
2y ago
Thanks for the upvotes. I've tried to communicate several times about this work here but I can't get any feedback. Please feel free to say what you think. I would really appreciate it.
60.
▲
Create HTML/ZIP/PNG Polyglot Files in JavaScript
(github.com)
5 points
by
gildas
2y ago
|
1 comments
More ›