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