From bffc77e47887f786d814945c71df35ae1f9d98c1 Mon Sep 17 00:00:00 2001 From: Promofaux Date: Sun, 21 Feb 2016 17:45:25 +0000 Subject: [PATCH 1/2] Add support for comments and blank lines in adlists.default/adlists.list --- gravity.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gravity.sh b/gravity.sh index 66b923b8..83700529 100755 --- a/gravity.sh +++ b/gravity.sh @@ -100,7 +100,12 @@ function gravity_collapse() { echo -n "::: Custom adList file detected. Reading..." sources=() while read -a line; do - sources+=($line) + #Do not read commented out or blank lines + if [[ $line = \#* ]] || [[ ! $line ]]; then + echo "" > /dev/null + else + sources+=($line) + fi done < $adListFile echo " done!" else @@ -108,7 +113,12 @@ function gravity_collapse() { echo -n "::: No custom adlist file detected, reading from default file..." sources=() while read -a line; do - sources+=($line) + #Do not read commented out or blank lines + if [[ $line = \#* ]] || [[ ! $line ]]; then + echo "" > /dev/null + else + sources+=($line) + fi done < $adListDefault echo " done!" fi From 13777cc1aa9e5740552bac2da6b53e48e1f6c85f Mon Sep 17 00:00:00 2001 From: Promofaux Date: Sun, 21 Feb 2016 18:12:57 +0000 Subject: [PATCH 2/2] update default list to include StevenBlack's amalgamated list (remove seperate lists included in that list). Take advantage of new support for commenting and blank lines --- adlists.default | 46 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/adlists.default b/adlists.default index cf5ca45b..493ca843 100644 --- a/adlists.default +++ b/adlists.default @@ -1,14 +1,46 @@ -https://adaway.org/hosts.txt +## Pi-hole ad-list default sources. Updated 21/02/2016 ######################### +# # +# To make changes to this file: # +# 1. run `cp /etc/pihole/adlists.default /etc/pihole/adlists.list # +# 2. run `nano /etc/pihole/adlists.list` # +# 3. Uncomment or comment any of the below lists # +# # +# Know of any other lists? Feel free to let us know about them, or add them # +# to this file! # +################################################################################ + +# The below list amalgamates several lists we used previously. +# See `https://github.com/StevenBlack/hosts` for details +https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts + +# Other lists we consider safe: http://adblock.gjtech.net/?format=unix-hosts -http://hosts-file.net/ad_servers.txt -http://www.malwaredomainlist.com/hostslist/hosts.txt -http://pgl.yoyo.org/adservers/serverlist.php? -http://someonewhocares.org/hosts/hosts -http://winhelp2002.mvps.org/hosts.txt http://mirror1.malwaredomains.com/files/justdomains http://sysctl.org/cameleon/hosts https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt -http://optimate.dl.sourceforge.net/project/adzhosts/HOSTS.txt + +# hosts-file.net list. Updated frequently, but has been known to block legitimate sites. +http://hosts-file.net/ad_servers.txt + +# Mahakala list. Has been known to block legitimage domains including the entire .com range. +#http://adblock.mahakala.is/ + +# ADZHOSTS list. Has been known to block legitimate domains +#http://optimate.dl.sourceforge.net/project/adzhosts/HOSTS.txt + +# Windows 10 telemetry list - warning this one may block windows update +#https://raw.githubusercontent.com/crazy-max/HostsWindowsBlocker/master/hosts.txt + +# Securemecca.com list - Also blocks "adult" sites (pornography/gambling etc) +#http://securemecca.com/Downloads/hosts.txt + +# Quidsup's tracker list https://raw.githubusercontent.com/quidsup/notrack/master/trackers.txt + + +# Untested Lists: +#https://raw.githubusercontent.com/reek/anti-adblock-killer/master/anti-adblock-killer-filters.txt +#http://spam404bl.com/spam404scamlist.txt +#http://malwaredomains.lehigh.edu/files/domains.txt