Skip to content

Instantly share code, notes, and snippets.

@io12
Created November 30, 2016 02:09
Show Gist options
  • Save io12/a4d1a27da8563c3006e783838d333039 to your computer and use it in GitHub Desktop.
Save io12/a4d1a27da8563c3006e783838d333039 to your computer and use it in GitHub Desktop.
#!/bin/sh
set -ue
echo "Resetting /etc/hosts"
cat /etc/hosts.def > /etc/hosts
echo "Populating /etc/hosts"
curl "http://winhelp2002.mvps.org/hosts.txt" >> /etc/hosts
curl "https://adaway.org/hosts.txt" >> /etc/hosts
curl "https://hosts-file.net/ad_servers.txt" >> /etc/hosts
curl "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext" >> /etc/hosts
echo "Done"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment