-
-
Save barraponto/87005b93501300560d4b097f49e75e90 to your computer and use it in GitHub Desktop.
creates a blocklist for your p2p endeavors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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