View cidr.py
This file contains 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 python | |
# | |
# Example 1: All blocks in list.txt, one CIDR per line | |
# cat list.txt | cidr.py (linux) | |
# type list.txt | cidr.py (Windows) | |
# | |
# Example 2: Echo CIDR blocks to stdout | |
# echo 1.2.3.0/25 1.2.3.128/25 | cidr.py | |
# Adjusted python print to print() to work with my python 3.5 on Windows. |