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=$(
|
||||
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 </td>'\
|
||||
| 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'
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue