From 1a36d3b675866ff4933258812a8b7ca671e25839 Mon Sep 17 00:00:00 2001 From: Mikhail Sandakov Date: Wed, 14 Feb 2024 09:07:09 +0200 Subject: [PATCH] Get the list of malicious bots from the mitchellkrogza/nginx-ultimate-bad-bot-blocker repository --- files/gen_badbots | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/files/gen_badbots b/files/gen_badbots index d9936257..dfcb6725 100755 --- a/files/gen_badbots +++ b/files/gen_badbots @@ -34,16 +34,12 @@ # #-----------------\____________________________________/------------------ -url=http://www.user-agents.org/index.shtml +url=https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/_generator_lists/bad-user-agents.list badbots=$( -for f in "" "?g_m" "?moz" "?n_s" "?t_z"; do - wget -q -O- $url$f; -done \ -| grep -h -B4 'S '\ -| sed -e 's/ //g' \ -| awk '/^--/{getline; gsub(" ",""); print $0}' \ -| sed -e 's/\([.\:|()+]\)/\\\1/g' \ +curl -sS $url \ | uniq \ +| sed -e 's/\\ / /g' \ +| sed -e 's/\([.\:|()+]\)/\\\1/g' \ | tr '\n' '|' \ | sed -e 's/|$//g' )