mirror of https://github.com/fail2ban/fail2ban
Get the list of malicious bots from the mitchellkrogza/nginx-ultimate-bad-bot-blocker repository
parent
31d39afde6
commit
1a36d3b675
|
@ -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=$(
|
badbots=$(
|
||||||
for f in "" "?g_m" "?moz" "?n_s" "?t_z"; do
|
curl -sS $url \
|
||||||
wget -q -O- $url$f;
|
|
||||||
done \
|
|
||||||
| grep -h -B4 '<td class="smallcell" nowrap>S </td>'\
|
|
||||||
| sed -e 's/ //g' \
|
|
||||||
| awk '/^--/{getline; gsub(" ",""); print $0}' \
|
|
||||||
| sed -e 's/\([.\:|()+]\)/\\\1/g' \
|
|
||||||
| uniq \
|
| uniq \
|
||||||
|
| sed -e 's/\\ / /g' \
|
||||||
|
| sed -e 's/\([.\:|()+]\)/\\\1/g' \
|
||||||
| tr '\n' '|' \
|
| tr '\n' '|' \
|
||||||
| sed -e 's/|$//g'
|
| sed -e 's/|$//g'
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue