Captcha-based bot rules

This commit is contained in:
Sascha Leib
2025-10-26 20:09:54 +01:00
parent bc52cf5354
commit 2c8aaf6cac
2 changed files with 18 additions and 4 deletions

View File

@@ -1680,6 +1680,16 @@ BotMon.live = {
return (countries.indexOf(visitor.geo) < 0);
}
return false;
},
// Check if visitor never went beyond a captcha
blockedByCaptcha: function(visitor) {
return (visitor._captcha.Y > 0 && visitor._captcha.N === 0);
},
// Check if visitor came from a whitelisted IP-address
whitelistedByCaptcha: function(visitor) {
return (visitor._captcha.W > 0);
}
}
},

View File

@@ -41,7 +41,7 @@
"id": "susClient", "desc": "Client identifier that is popular with bot networks",
"bot": 10
},
{"func": "matchesClient", "params": ["undici","gohttp","urllib","wget","curl"],
{"func": "matchesClient", "params": ["undici","gohttp","python","wget","curl"],
"id": "botClient", "desc": "Client identifier indicates web crawler",
"bot": 100
},
@@ -69,9 +69,13 @@
"id": "langMatch", "desc": "Clients Accept-Language header does not match the page language",
"bot": 30
},
{"func": "matchesClient", "params": ["whatsapp","applemsgs","goognblm","tiktok","meta","chatgpt","claude","perplexity"],
"id": "previewClient", "desc": "User-triggered bot load (e.g. preview)",
"bot": -120
{"func": "blockedByCaptcha", "params": [],
"id": "blockedByCaptcha", "desc": "Visitor was blocked by captcha",
"bot": 20
},
{"func": "whitelistedByCaptcha", "params": [],
"id": "whitelistedByCaptcha", "desc": "Visitor uses a whitelisted IP address",
"bot": -30
}
]
}