|
@@ -9,10 +9,10 @@ trap "/bin/rm -f ${tmp}" EXIT SIGHUP SIGINT SIGTERM
|
|
|
|
|
|
|
|
curl -f -s -S -m 60 -o $tmp "https://www.badips.com/get/list/${banservice}/${banlevel}?age=${rangecheck}"
|
|
curl -f -s -S -m 60 -o $tmp "https://www.badips.com/get/list/${banservice}/${banlevel}?age=${rangecheck}"
|
|
|
while read -r ip ; do
|
|
while read -r ip ; do
|
|
|
- ipset -! add ${banset} ${ip} timeout $banttl
|
|
|
|
|
|
|
+ [[ "$ip" =~ ^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$ ]] && ipset -! add ${banset} ${ip} timeout $banttl
|
|
|
done < $tmp
|
|
done < $tmp
|
|
|
|
|
|
|
|
curl -f -s -S -m 60 -o $tmp "http://api.blocklist.de/getlast.php?time=3600&service=all"
|
|
curl -f -s -S -m 60 -o $tmp "http://api.blocklist.de/getlast.php?time=3600&service=all"
|
|
|
while read -r ip ; do
|
|
while read -r ip ; do
|
|
|
- ipset -! add ${banset} ${ip} timeout $banttl
|
|
|
|
|
|
|
+ [[ "$ip" =~ ^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$ ]] && ipset -! add ${banset} ${ip} timeout $banttl
|
|
|
done < $tmp
|
|
done < $tmp
|