#!/usr/bin/env bash # Main script for eulaurarien # Get all subdomains accessed by each website in the website list ./collect_subdomains.py websites.list > subdomains.list sort -u subdomains.list > subdomains.sorted.list # Filter out the subdomains not pointing to a first-party tracker ./filter_subdomains.py subdomains.sorted.list > toblock.list sort -u toblock.list > toblock.sorted.list # Format the blocklist so it can be used as a hostlist ( echo "# First party trackers" echo "# List generated on $(date -Isec) by eulaurarien $(git describe --tags --dirty)" cat toblock.sorted.list | while read host; do echo "0.0.0.0 $host" done ) > toblock.hosts.list