Skip to content

Instantly share code, notes, and snippets.

View Sam-Lane's full-sized avatar

Sam Lane Sam-Lane

View GitHub Profile
@Sam-Lane
Sam-Lane / subnet.py
Created February 27, 2017 13:07 — forked from Lyrain/subnet.py
Script to "cheat" at sub-netting.
#!/usr/local/bin/python3
import sys
import ipaddress as ip
def print_help():
print("Usage: ")
print("main.py address [computers]\n")
print("address: must be an IPv4 network address (including netmask in shorthand e.g. 192.168.211.0/27)")
print("computers: optional - Number of computers on subnet. Will only print first and last host address.")