Skip to content

Instantly share code, notes, and snippets.

@rdapaz
Created October 7, 2020 04:14
Show Gist options
  • Select an option

  • Save rdapaz/f3ededde1ab7a93a18a62008b2fdf906 to your computer and use it in GitHub Desktop.

Select an option

Save rdapaz/f3ededde1ab7a93a18a62008b2fdf906 to your computer and use it in GitHub Desktop.
List All IPs on a Subnet
import ipaddress
nw = ipaddress.IPv4Network('192.168.10.0/28')
for ip in nw:
print(ip)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment