Generates a host list of first-party trackers for ad-blocking.
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.

19 lines
720 B

  1. #!/usr/bin/env bash
  2. function log() {
  3. echo -e "\033[33m$@\033[0m"
  4. }
  5. log "Compiling nameservers…"
  6. pv nameservers/*.list | ./validate_list.py --ip4 | sort -u > temp/all_nameservers_ip4.list
  7. log "Compiling subdomain…"
  8. # Sort by last character to utilize the DNS server caching mechanism
  9. # (not as efficient with massdns but it's almost free so why not)
  10. pv subdomains/*.list | ./validate_list.py --domain | rev | sort -u | rev > temp/all_subdomains.list
  11. log "Resolving subdomain…"
  12. massdns --output Snrql --retry REFUSED,SERVFAIL --resolvers temp/all_nameservers_ip4.list --outfile temp/all_resolved.txt temp/all_subdomains.list
  13. log "Importing into database…"
  14. pv temp/all_resolved.txt | ./feed_dns.py massdns