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.

22 lines
693 B

#!/usr/bin/env bash
# Main script for eulaurarien
# Get all subdomains accessed by each website in the website list
./ websites.list > subdomains.list
sort -u subdomains.list > subdomains.sorted.list
# Filter out the subdomains not pointing to a first-party tracker
./ 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;
echo " $host"
) > toblock.hosts.list