Skip to content

Instantly share code, notes, and snippets.

@ITJesse
Created January 15, 2017 20:11
Show Gist options
  • Save ITJesse/33cedaed1048c1e9ca311ff5c21ff151 to your computer and use it in GitHub Desktop.
Save ITJesse/33cedaed1048c1e9ca311ff5c21ff151 to your computer and use it in GitHub Desktop.
curl http://blog.monstuff.com/ad-block-pac.js | \
grep dnsDomainIs | \
grep -v '//' | \
grep -v 'function' | \
awk -F '[""]' '{print $2}' | \
awk '$1 ~ /^\./ {printf "DOMAIN-SUFFIX,%s,ADBLOCK\n",substr($1,2)} $1 !~ /^\./ {printf "DOMAIN,%s,ADBLOCK\n",$1}' \
> adblock.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment