Created
November 15, 2017 10:25
-
-
Save unnamedfeeling/01472b206aec4cb12890e2be3a81e496 to your computer and use it in GitHub Desktop.
Bash script for stripping out many adverts on the net (in addition to adblock and ghostery). Applicable for routers or linux distros.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm /etc/hosts | |
wget http://winhelp2002.mvps.org/hosts.txt -q -O ->> /opt/etc/hosts | |
wget http://hosts-file.net/ad_servers.txt -q -O ->> /opt/etc/hosts | |
wget "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext" -q -O ->> /opt/etc/hosts | |
sed -i 's/127.0.0.1/0.0.0.0/g' /opt/etc/hosts | |
ln -s /opt/etc/hosts /etc/hosts | |
killall dnsmasq | |
dnsmasq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment