Skip to content

Instantly share code, notes, and snippets.

@barraponto
Forked from glaszig/mkp2pblocklist
Created September 4, 2017 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barraponto/87005b93501300560d4b097f49e75e90 to your computer and use it in GitHub Desktop.
Save barraponto/87005b93501300560d4b097f49e75e90 to your computer and use it in GitHub Desktop.
creates a blocklist for your p2p endeavors
#!/usr/bin/env sh
# inspired by https://gist.github.com/johntyree/3331662#gistcomment-1968023
#
# usage:
# mkp2pblocklist > /tmp/blockp2p.list
# or
# mkp2pblocklist | gzip -9 > /tmp/blockp2p.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