„update_blocklist.sh“ ändern
This commit is contained in:
parent
a9398b93eb
commit
c3833f8a87
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ sqlite3 -header -csv /etc/synoautoblock.db "select IP FROM AutoBlockIP WHERE TYP
|
||||||
# load online IP-list:
|
# load online IP-list:
|
||||||
curl -s "https://lists.blocklist.de/lists/${BLOCKLIST_TYP}.txt" | sort > /tmp/onlinelist.txt
|
curl -s "https://lists.blocklist.de/lists/${BLOCKLIST_TYP}.txt" | sort > /tmp/onlinelist.txt
|
||||||
# filter diffs:
|
# filter diffs:
|
||||||
diff "/tmp/before.txt" "/tmp/onlinelist.txt" | grep '^>' | sed -e 's/>//' > /tmp/blocklist.txt # only diffs from left to right
|
diff "/tmp/before.txt" "/tmp/onlinelist.txt" | grep '^>' | sed -e 's/> //' > /tmp/blocklist.txt # only diffs from left to right
|
||||||
# stats …
|
# stats …
|
||||||
IPcountdiffs=$(cat "/tmp/blocklist.txt" | grep -Eo "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" | wc -l)
|
IPcountdiffs=$(cat "/tmp/blocklist.txt" | grep -Eo "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" | wc -l)
|
||||||
IPcountList=$(cat "/tmp/onlinelist.txt" | grep -Eo "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" | wc -l)
|
IPcountList=$(cat "/tmp/onlinelist.txt" | grep -Eo "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" | wc -l)
|
||||||
|
|
Loading…
Reference in a new issue