Skip to content

Instantly share code, notes, and snippets.

Avatar

Capcom ddfault

View GitHub Profile
@ddfault
ddfault / cidr.py
Last active Jun 25, 2020 — forked from toringe/cidr.py
Merge CIDR blocks into super blocks if possible
View cidr.py
#!/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.
You can’t perform that action at this time.