logoalt Hacker News

Fancy Curl Sites

42 points • by adunk • today at 7:29 PM • 10 comments • view on HN

Comments

colewilson • today at 9:23 PM

Very neat! It's also possible to do this 100% statically without checking the user agent, by using alternate terminal buffers:

   - `curl -L https://cole.ws` (my personal portfolio site) does this
It embeds the actual HTML inside an alternate terminal buffer (starting with `<!--\x1b[?1049h-->\r` and ending with `<!--\x1b[?1049l\x1b[3D\r`), and has the curl-able content appended to the end.

When you curl it, it still writes the HTML to your terminal, but immediately clears that buffer and writes the ANSI version to your real screen. In browsers, this ANSI stuff is hidden in an HTML comment. This is useful for static sites on GitHub pages or something.

classictraffic • today at 8:01 PM

Fun! I also did something similar with my personal website this summer:

- `curl listening.cailinpitt.com` shows what music I've been listening to recently

- `curl reading.cailinpitt.com` shows what books and articles I've been reading recently

➕ show 1 reply
IncRnd • today at 9:19 PM

Also germane today a fix for curl/libcurl was released. The main vulnerability hinges upon using a malicious server to attack the client.

CVE-2026-92392

https://daniel.haxx.se/blog/2026/10/07/twenty-two-pending-cu...

jayknight • today at 8:07 PM

>If you were just trying to download the original HTML version of this page, add -H "X-Original: true" to the curl command to have the server respond exactly how it would've to any non-curl HTTP client.

It seems like "Accept: text/html" would be more standard

https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/...

... and then use `text/x-ansi` as the curl version, so other text-based clients could also fetch it:

wget -O - --header='Accept: text/x-ansi' nytpu.com/gemlog/2026-03-18

See: https://www.digipres.org/formats/sources/wikidata/formats/#q...

➕ show 1 reply
zanderwohl • today at 8:02 PM

I think these are very fun and I would love to see more content you can visit with curl. I'm setting up a home chores + calendar + weather station that runs off my homeserver. I was contemplating making a plaintext version so very stupid devices could still read and display interesting data.

Rohansi • today at 8:33 PM

FYI it works just fine on Windows if you run it from Terminal instead. As long as you don't use PowerShell mode in it.

djriley • today at 9:27 PM

Awesome! I always wanted to try browsing the web like RMS ;)

➕ show 1 reply