Modified script to handle more types of blocklists (#1771)

Added/modified script to better handle multiple types of blocklists available to drop in to the BLOCKLIST_URLS.
pull/1788/head
Wade Winright 4 years ago committed by GitHub
parent 02fe2f7dd5
commit e29615bc05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save