Skip to content

Instantly share code, notes, and snippets.

@ixs
Created August 4, 2021 12:57
Show Gist options
  • Save ixs/5b18c0d8cdbd897fc97e76e7e140b16b to your computer and use it in GitHub Desktop.
Save ixs/5b18c0d8cdbd897fc97e76e7e140b16b to your computer and use it in GitHub Desktop.
prips in python - support ipv6
#!/usr/bin/env python3
import ipaddress
import sys
for ip in ipaddress.ip_network(sys.argv[1]).hosts():
print(ip)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment