Modified script to handle more types of blocklists

Added/modified script to better handle multiple types of blocklists available to drop in to the BLOCKLIST_URLS.
This commit is contained in:
Wade Winright 2020-02-27 21:52:24 +13:00 committed by GitHub
parent 3f3138f555
commit 6856f0ec74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@ rm -f $BLOCKHOSTS
echo 'Downloading hosts lists...'
#Download and process the files needed to make the lists (enable/add more, if you want)
for url in $BLOCKLIST_URLS; do
wget --timeout=2 --tries=3 -qO- "$url" | grep -Ev "(localhost)" | grep -Ew "(0.0.0.0|127.0.0.1)" | awk '{sub(/\r$/,"");print $2}' >> "$TEMP"
wget --timeout=2 --tries=3 -qO- "$url" | grep -Ev "(localhost)" | grep -Ev "#" | sed -E "s/(0.0.0.0 |127.0.0.1 |255.255.255.255 )//" >> "$TEMP"
done
#Add black list, if non-empty