Skip to content

Instantly share code, notes, and snippets.

@ansulev
Last active December 10, 2017 09:03
Show Gist options
  • Save ansulev/39ac410ff7846fa6fd19b904590c4ed0 to your computer and use it in GitHub Desktop.
Save ansulev/39ac410ff7846fa6fd19b904590c4ed0 to your computer and use it in GitHub Desktop.
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# inspired by https://gist.github.com/johntyree/3331662#gistcomment-1968023
# created by https://gist.github.com/glaszig/bf96beccf4694ae25d4f1f7cc6224985
# usage:
# getBlockLists.sh > /tmp/blockp2p.list
# or
# getBlockLists.sh | gzip -9 > /tmp/blockp2p.list.gz
# daily updated: https://silo.glasz.org/antip2p.list.gz
#
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$PATH"
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=p2p.*\)'.*/\1/p" \
| xargs curl -sL \
| gunzip \
| egrep -v '^#' \
| uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment