transmission-blocklist/blocklist-build.sh

9 lines
452 B
Bash
Raw Permalink Normal View History

2021-12-29 15:26:55 +01:00
#!/bin/sh
curl -s https://www.iblocklist.com/lists.json | \
jq -r '.lists[] | .name as $n | select((.subscription == "false") and ($n | startswith("iana-") | not) and (["fornonlancomputers", "bogon", "The Onion Router"] | index($n) | not)) | .list' | \
awk 'length($0) > 2 { print "http://list.iblocklist.com/?fileformat=p2p&archiveformat=gz&list=" $0 }' | \
xargs wget -O - | \
gunzip | \
egrep -v '^#' | \
gzip > blocklist.gz