diff --git a/admin.js b/admin.js index 00cecc9..751eb9d 100644 --- a/admin.js +++ b/admin.js @@ -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); } } }, diff --git a/config/default-config.json b/config/default-config.json index e9e28a3..8134cc5 100644 --- a/config/default-config.json +++ b/config/default-config.json @@ -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": "Client’s ‘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 } ] } \ No newline at end of file