jobs - edit adren work on external blacklists
This commit is contained in:
parent
10dc58cb6d
commit
83841b290a
|
@ -16,7 +16,7 @@ fi
|
|||
|
||||
# generate the new conf
|
||||
curl -s "https://iplists.firehol.org/files/firehol_abusers_30d.netset" | \
|
||||
grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/?[0-9]*$") \
|
||||
grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/?[0-9]*$" | \
|
||||
sed 's/^/deny /;s/$/;/' > /tmp/block-abusers.conf
|
||||
|
||||
# check if we have at least 1 line
|
||||
|
|
|
@ -16,7 +16,7 @@ fi
|
|||
|
||||
# generate the new conf
|
||||
curl -s "https://iplists.firehol.org/files/tor_exits.ipset" | \
|
||||
grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/?[0-9]*$") \
|
||||
grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/?[0-9]*$" | \
|
||||
sed 's/^/deny /;s/$/;/' > /tmp/block-tor-exit-node.conf
|
||||
|
||||
# check if we have at least 1 line
|
||||
|
|
|
@ -16,7 +16,7 @@ fi
|
|||
|
||||
# generate the new conf
|
||||
curl -s "https://iplists.firehol.org/files/firehol_proxies.netset" | \
|
||||
grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/?[0-9]*$" \
|
||||
grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/?[0-9]*$" | \
|
||||
sed 's/^/deny /;s/$/;/' > /tmp/block-proxies.conf
|
||||
|
||||
# check if we have at least 1 line
|
||||
|
|
|
@ -19,7 +19,7 @@ BLACKLIST="$(curl -s https://raw.githubusercontent.com/mitchellkrogza/nginx-ulti
|
|||
if [ "$?" -ne 0 ] ; then
|
||||
job_log "[BLACKLIST] can't update referrers list"
|
||||
fi
|
||||
echo -e "map \$http_referer \$bad_referrer { hostnames; default no; $(echo $DATA | sed 's/^/"~/;s/$/" yes;/') }" > /tmp/map-referrer.conf
|
||||
echo -e "map \$http_referer \$bad_referrer { hostnames; default no; $(echo -e "$BLACKLIST" | sed 's/^/"~/;s/$/" yes;/') }" > /tmp/map-referrer.conf
|
||||
|
||||
# check number of lines
|
||||
lines="$(wc -l /tmp/map-referrer.conf | cut -d ' ' -f 1)"
|
||||
|
|
|
@ -20,7 +20,7 @@ curl -s https://raw.githubusercontent.com/JayBizzle/Crawler-Detect/master/raw/Cr
|
|||
if [ "$?" -ne 0 ] ; then
|
||||
job_log "[BLACKLIST] can't update user-agent list"
|
||||
fi
|
||||
echo -e "map \$http_user_agent \$bad_user_agent { default no; $(echo $BLACKLIST | sed 's:\([^\\]\) :\1\\\\ :;s:^:~*:;s:$: yes;:') }" > /tmp/map-user-agent.conf
|
||||
echo -e "map \$http_user_agent \$bad_user_agent { default no; $(echo $BLACKLIST | sed 's: :\\ :g;s:^:~*:;s:$: yes;:') }" > /tmp/map-user-agent.conf
|
||||
|
||||
# check number of lines
|
||||
lines="$(wc -l /tmp/map-user-agent.conf | cut -d ' ' -f 1)"
|
||||
|
|
Loading…
Reference in New Issue