Get the list of malicious bots from the mitchellkrogza/nginx-ultimate-bad-bot-blocker repository

pull/3678/head
Mikhail Sandakov 2024-02-14 09:07:09 +02:00
parent 31d39afde6
commit 1a36d3b675
1 changed files with 4 additions and 8 deletions

View File

@ -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 '<td class="smallcell" nowrap>S&nbsp;</td>'\
| sed -e 's/&nbsp;//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'
)