this post was submitted on 14 May 2025
92 points (100.0% liked)

TechTakes

1859 readers
256 users here now

Big brain tech dude got yet another clueless take over at HackerNews etc? Here's the place to vent. Orange site, VC foolishness, all welcome.

This is not debate club. Unless it’s amusing debate.

For actually-good tech, you want our NotAwfulTech community

founded 2 years ago
MODERATORS
top 24 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 10 hours ago* (last edited 10 hours ago)

jwz gave the game away, so i'll reveal:

the One Weird Trick for this week is that the bots pretend to be an old version of Chrome. So you can block on useragent

so I blocked old Chrome from hitting the expensive mediawiki call on rationalwiki and took our load average from 35 (unusable) to 0.8 (schweeet)

caution! this also blocks the archive sites, which pretend to be old chrome. I refined it to only block the expensive query on mediawiki, vary as appropriate.

nginx code:

        # block some bot UAs for complex requests
        # nginx doesn't do nested if, so we set a test variable
        # if $BOT is both Complex and Old, block as bot
        set $BOT "";
        if ($uri ~* (/w/index.php)) {
            set $BOT "C"; }

            if ($http_user_agent ~* (Chrome/[2-9])) {
                set $BOT "${BOT}O";}
            if ($http_user_agent ~* (Chrome/1[012])) {
                set $BOT "${BOT}O";}
            if ($http_user_agent ~* (Firefox/3)) {
                set $BOT "${BOT}O";}
            if ($http_user_agent ~* (MSIE)) {
                set $BOT "${BOT}O";}

            if ($BOT = "CO") {
                return 503;}

you always return "503" not "403", because 403 says "fuck off" but the scrapers are used to seeing 503 from servers they've flattened.

I give this trick at least another week.

[–] [email protected] 3 points 10 hours ago

Re the blocking of fake useragents, what people could try is see if there are things older useagents do (or do wrong) which these do not. I heard of some companies doing that. (Long ago I also heard of somebody using that to catch mmo bots in a specific game. There was a packet that if the server send it to a legit client, the client crashed, a bot did not). I'd assume the specifics are treated as secret just because you don't want the scrapers to find out.

[–] [email protected] 7 points 20 hours ago (1 children)

Count them as ad visits, to make big tech pay for better hardware or line?

[–] [email protected] 6 points 19 hours ago (1 children)

That opens you up to getting accused of click fraud, as AdNauseam found out the hard way but its worth it if you can squeeze some cash out of them before that happens.

[–] [email protected] 5 points 16 hours ago

I mean, scraping bots would obviously obey robots.txt so those scraping - bots, i mean users can't be bots

[–] [email protected] 5 points 23 hours ago* (last edited 23 hours ago) (1 children)

In my experience with bots, a portion of them obey robots.txt, but it's tricky to find the user agent string that some bots react to.

So I recommend having a robots.txt that not only target specific bots, but also tell all bots to avoid specific paths/queries.

Example for dokuwiki

User-agent: *
Noindex: /lib/
Disallow: /_export/
Disallow: /user/
Disallow: /*?do=
Disallow: /*&do=
Disallow: /*?rev=
Disallow: /*&rev=
[–] [email protected] 3 points 22 hours ago (1 children)

Would it be possible to detect the gptbot (or similar) of their user agent, and server them different data?

Can they detect that?

[–] [email protected] 7 points 21 hours ago* (last edited 21 hours ago) (2 children)

yes, you can match on user agent, and then conditionally serve them other stuff (most webservers are fine with this). nepenthes and iocaine are the current preferred/recommended servers to serve them bot mazes

the thing is that the crawlers will also lie (openai definitely doesn't publish all its own source IPs, I've verified this myself), and will attempt a number of workarounds (like using residential proxies too)

[–] [email protected] 2 points 9 hours ago* (last edited 9 hours ago)

Generating plausible-looking gibberish require resources. Giving any kind of response to these bots is a waste of resources, even if it's giberish.

My current approach is to have a robots.txt for bots than honor it. And drop all traffic during 24h for IPs used by bots that ignore robots.txt or misbehave.

[–] [email protected] 3 points 21 hours ago

Can they detect that they're being served different content though?

[–] [email protected] 17 points 1 day ago (2 children)

It's a constant cat and mouse atm. Every week or so, we get another flood of scraping bots, which force us to triangulate which fucking DC IP range we need to start blocking now. If they ever start using residential proxies, we're fucked.

[–] [email protected] 12 points 1 day ago (1 children)

I have a tiny neocities website which gets thousands of views a day, there is no way that anyone is viewing it often enough for that to be organic.

[–] [email protected] 12 points 1 day ago (1 children)

quickly, add some ad revenue :P

[–] [email protected] 7 points 1 day ago

From ai vendors. Let them pay you for scraping you lol

[–] [email protected] 9 points 1 day ago (2 children)

at least OpenAI and probably others do currently use commercial residential proxying services, though reputedly only if you make it obvious you’re blocking their scrapers, presumably as an attempt on their end to limit operating costs

[–] [email protected] 3 points 20 hours ago (1 children)

They have a botnet on residential devices?

[–] [email protected] 4 points 19 hours ago (1 children)

the term of art is "residential proxy" and there's a ton of them

for example: it's the flipside of Bright's free VPN service - through Bright Data they sell people access proxied via some user's connection

[–] [email protected] 2 points 15 hours ago

And companies like honey that pay you (a pittance) to proxy people's requests to porn sites.

[–] [email protected] 6 points 1 day ago (2 children)

Oh never heard of that. I have blocked their scrapers via agents but I haven't felt residential proxy pain.

[–] [email protected] 15 points 1 day ago

@db0 @self Residential Proxy Pain are playing at the Dublin Castle in Camden this Friday, £4 advance, £5 on the door

[–] [email protected] 9 points 1 day ago (2 children)
[–] [email protected] 5 points 21 hours ago (1 children)

PS: Looks like that sync issue between our instances is resolved now?

[–] [email protected] 1 points 2 hours ago

yep, it seems so! I haven’t put the permanent fix for the nodeinfo bug into place yet but it’ll be live as soon as I’m able to give it an appropriate level of testing.

[–] [email protected] 7 points 1 day ago

Daym, I should set me up some iocane as well I think