From 684e041998406532c6ef1e899ebc94ca5049d938 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Tue, 9 May 2023 16:42:29 +0200 Subject: Improve detection of crawlers/bots (#1968) Add support for Facebook crawler --- src/lib/protocols/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/protocols') diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index 320fd22e4..2109f8ed3 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -607,8 +607,8 @@ static void ndpi_check_user_agent(struct ndpi_detection_module_struct *ndpi_stru Amazon-Route53-Health-Check-Service (ref 68784dad-be98-49e4-a63c-9fbbe2816d7c; report http://amzn.to/1vsZADi) Anonymous Crawler/1.0 (Webcrawler developed with StormCrawler; http://example.com/; webcrawler@example.com) */ - if((strstr(ua, "+http") != NULL) - || (strstr(ua, " http") != NULL) + if((strstr(ua, "+http:") != NULL) + || (strstr(ua, " http:") != NULL) || ndpi_strncasestr(ua, "Crawler", ua_len) || ndpi_strncasestr(ua, "Bot", ua_len) /* bot/robot */ ) { -- cgit v1.2.3