Generates a host list of first-party trackers for ad-blocking. https://hostfiles.frogeye.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
848 B

  1. #!/usr/bin/env bash
  2. function dl() {
  3. echo "Downloading $1 to $2..."
  4. curl --silent "$1" > "$2"
  5. if [ $? -ne 0 ]
  6. then
  7. echo "Failed!"
  8. fi
  9. }
  10. # Get rules
  11. dl https://easylist.to/easylist/easyprivacy.txt rules_adblock/easyprivacy.cache.txt
  12. dl https://raw.githubusercontent.com/StevenBlack/hosts/master/data/add.2o7Net/hosts rules_hosts/add2o7.cache.txt
  13. # Get a list of nameservers
  14. rm -f nameservers
  15. touch nameservers
  16. [ -f nameservers.head ] && cat nameservers.head >> nameservers
  17. dl https://public-dns.info/nameservers.txt nameservers.temp
  18. sort -R nameservers.temp >> nameservers
  19. rm nameservers.temp
  20. # Get top 1M subdomains
  21. wget http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip
  22. unzip top-1m.csv.zip
  23. sed 's|^[0-9]\+,||' top-1m.csv > subdomains/cisco-umbrella_popularity.cache.list
  24. rm top-1m.csv top-1m.csv.zip