Created
August 1, 2017 21:05
-
-
Save bandrel/e432f55b79a001a8a10e7c87433d0858 to your computer and use it in GitHub Desktop.
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 python3 | |
import ipaddress | |
import sys | |
subnets = str(sys.argv[1]).split(',') | |
for network in subnets: | |
for host in ipaddress.IPv4Network(network).hosts(): | |
print(host) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment