
Rick Moen wrote:
Quoting Trent W. Buck (trentbuck@gmail.com):
...but there are always some who won't follow it, so I do this:
cat >>/etc/hosts 127.254.254.254 blocked.invalid twitter.com facebook.com google-analytics.com ...
You might like my prototype BIND9 conffiles, which resolve locally a great many advertising, data-mining, and similar domains. http://linuxmafia.com/pub/linux/network/bind9-examples-linuxmafia.tar.gz
Not a bind9 fan, but since we're going down that rabbit warren, hostrev () { local a fqdn new; while IFS=. read -ra fqdn; do new=(); for ((a = ${#fqdn[@]} - 1; a >= 0; a--)); do new+=("${fqdn[a]}"); done; ( IFS=.; printf '%s\n' "${new[*]}" ); done; } printf '%s ' 127.254.254.254 blacklisted.invalid $(curl -sL http://easylist.adblockplus.org/easyprivacy.txt http://easylist.adblockplus.org/easylist_noelemhide.txt | grep '^||[a-z0-9.]*[a-z][a-z0-9.]*\^$' | tr -d '|^' | hostrev | sort | hostrev) ...is how I extract what I can from the adblock lists. It's unfortunate they accumulated such a crufty DSL. The "hostrev | sort | hostrev" part sorts a newline-separated list of domains by component -- most significant component first. I have an unmaintained thing that tries to do a better job converting it into EREs for polipo's blacklist, but I got sick of polipo crashing. http://cyber.com.au/~twb/.polipo-forbidden I don't particularly care for adblockplus's lists, but I'm far too lazy to make my own, and I don't know anyone else (other than you, now, Rick) who maintains a list for me. Hm, have we had this entire conversation before? If so, apologies for my leaky memory.