I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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
| #!/bin/sh | |
| # This script runs every other night at 04:56 CET on a webserver I maintain | |
| # Results are always at: https://jult.net/block.txt ( or https://jult.net/block.txt.gz ) | |
| # And much smaller, stripped of BS; https://jult.net/bloc.txt | |
| # For use in Tixati IP filter: https://jult.net/bloc.txt.gz !!! | |
| # And finally a txt file with just the bold IP-ranges: https://jult.net/bl.txt (or https://jult.net/bl.txt.gz ) | |
| # Download open block-lists, unpack, filter: | |
| curl -s https://www.iblocklist.com/lists.php | grep -A 2 Bluetack | xargs wget -qO - --limit-rate=500k | gunzip -f | egrep -v '^#' > /tmp/xbp |
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
| # | |
| # Copyright (C) 2013-2020 Vinay Sajip. New BSD License. | |
| # | |
| import os | |
| import os.path | |
| from subprocess import Popen, PIPE | |
| import sys | |
| from threading import Thread | |
| from urllib.parse import urlparse | |
| from urllib.request import urlretrieve |