Imagine you need to pre-load caches on edge nodes, of which you have several in front of a back-end. Or you want to check if you're getting same content from all edge nodes.

You would need an HTTPS-enabled, SNI-capable web crawler which you can explicitly tell either a). which domain to use in the Host header and the TLS SNI ClientHello; or b). which IP to resolve a given domain as.

Turns out can do crawling, but can't do explicit SNI or domain resolution; the other way around. 🤦‍♀️

Follow

If one does the research around it, one finds amazing things. LD_PRELOAD tricks are cute, but my favorite has to be using perl to binary-patch libnss_files.so.2 to change the location it looks for the hosts file at:
unix.stackexchange.com/a/57598

My answer is, as always, way too much Bash:
git.occrp.org/libre/utils/blob

It's terrible, it's buggy (redirects are not handled well yet), it's slow. But it gets the job done.

· · Web · 0 · 1 · 3
Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!