Skip to content

Commit

Permalink
Create uncidr.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aringo authored Mar 9, 2020
1 parent f677e88 commit 59f1b46
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions uncidr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""
I like my ipv4s one by one and so do most tools
cat jackedtargets | uncidr.py > targets
"""
#!/usr/bin/env python3

import sys
import ipaddress

if len(sys.argv) < 2:
commands = sys.stdin.readlines()
else:
commands = sys.argv
for arg in commands:
try:
for ip in ipaddress.IPv4Network(arg.rstrip('\n')):
print(ip)
except:
pass

0 comments on commit 59f1b46

Please sign in to comment.