3 ms·
Neat, works against example.com exec 3<>/dev/tcp/example.com/80 printf 'GET / HTTP/1.1\r\nHost: example.com\r\nConnection: close\r\n\r\n' >&3 cat <&3 Ou
by simonw 5mo ago
Neat, works against example.com
exec 3<>/dev/tcp/example.com/80
printf 'GET / HTTP/1.1\r\nHost: example.com\r\nConnection: close\r\n\r\n' >&3
cat <&3
Outputs:
HTTP/1.1 200 OK
Date: Tue, 16 Jun 2026 17:37:45 GMT
Content-Type: text/html
...
I always end up on example.com for this kind of thing because there are so few domains these days that don't enforce https!
- QuantumNomad_ 5mo agoexample.com is also great for that reason when something fails about a captive portal on a public WiFi. I open my web browser and go to http://example.com http://example.com and get redirected to the captive portal page again and retry completing what they need from me to get internet access.
- some_random 5mo agoFun fact, this is almost exactly how active portal detection is done in the OS/browser! https://gist.github.com/skull-squadron/edb8c0122f902013304c031ebb01c1a1 https://gist.github.com/skull-squadron/edb8c0122f902013304c0...
- QuantumNomad_ 5mo agoYep :) I just find example.com easier to remember and quicker to type than any of the OS or browser makers own URLs like - http://captive.apple.com/ http://captive.apple.com/ - http://connectivitycheck.gstatic.com/generate_204 http://connectivitycheck.gstatic.com/generate_204 - http://detectportal.brave-http-only.com/ http://detectportal.brave-http-only.com/ Plus, it feels nice to depend on the reserved domain name example.com instead of relying on a domain that any one specific corporation has to maintain :D
- 1f60c 5mo agoAlso http://detectportal.firefox.com http://detectportal.firefox.com. And http://neverssl.com http://neverssl.com was set up for this purpose while being a bit easier to remember :)
- 0l 5mo agoI remember a while back neverssl.com would happily serve HTTPS requests! Another good alternative is http://httpforever.com/ http://httpforever.com/
- xp84 5mo agoWhat gives you confidence example.com won't start serving the HTTPS redirect though? There isn't any reason they wouldn't, and given that browsers are clearly tending towards showing big scary warnings to even accessing something over cleartext, I wouldn't be surprised if they flipped that switch just to avoid confusing noobs.
- QuantumNomad_ 4mo agoTrue, that could happen. If it does do that then I will have to switch over to remembering a different URL instead. But as long as it hasn’t I will keep using http://example.com http://example.com :)
- LeoPanthera 5mo agoI use neverssl.com for this purpose because it is designed to resist caching.
- xp84 5mo agoI have been using neverssl.com for this same purpose :) My only concern would be that example.com doesn't promise to never do the 'required SSL' thing.
- gabrielsroka 5mo agoThis works too exec 3<>/dev/tcp/example.com/80 printf 'GET / HTTP/1.1\r Host: example.com\r Connection: close\r \r ' >&3 cat <&3 You can even take out the \r though they should be there