Created
December 20, 2018 08:13
-
-
Save ehsahil/912a37a9a1b4d3c2e52ef75dea408c94 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 python2 | |
import sys | |
from netaddr import IPNetwork | |
if __name__ == "__main__": | |
if len(sys.argv) != 2: | |
print "Usage: %s <CIDR Block>\n" % sys.argv[0] | |
else: | |
for ip in IPNetwork(sys.argv[1]): | |
print '%s' % ip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment