Forum Moderators: open
Mozlila/5.0 (Linux; Android 7.0; SM-G892A Bulid/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.107 Moblie Safari/537.36 Does it also request /.github ?Surprisingly, no. I do find the element "github" in logs, but only as part of the UA string. Checking for other blocked or nonexistent dot-files, I do find the occasional /.gitignore ... which sounds like a “took the words right out of my mouth” filename. But that seems to be from unrelated robots.
/.env (what the heck is that, anyway?)
Reads the key-value pair from .env file and adds them to environment variable. It is great for managing app settings during development and in production using 12-factor principles.
great for managing app settings during development and in productionPresumably, then, also great for providing some type of information that is useful to some type of malign robot. (I have yet to meet a good and useful robot that misspells three separate words in its UA string, though I suppose they might exist.)
It used a combination of hoster and ISP IP addresses.That's why I shifted to primarily header-based blocking, along with unwanted UAs. Over the years I've had to add some IP ranges--most of them, big surprise, Hetzner or OVH--but headers are the first line of defense. I also maintain a short list of down-to-the-last-digit IPs from human ISP ranges that I assume represent infected human machines; these I check every few months and remove as they become inactive.
the hoster ranges may have some good bots or exits for corporate proxiesThat's why I'm reduced to two different IP-based lockouts. One goes
try:
eNv = "{}/.env".format(url)
headers = {
'Connection': 'keep-alive',
'Cache-Control': 'max-age=0',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozlila/5.0 (Linux; Android 7.0; SM-G892A Bulid/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.107 Moblie Safari/537.36',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'en-US,en;q=0.9,fr;q=0.8',
}
rsmTP = requests.get(eNv, headers=headers, allow_redirects=True, timeout=50)
headers = {This sent me to logged headers, which I hadn't looked at earlier. Yup, there they all are, claiming to speak French. On my site the Connection header comes through as