Created
October 24, 2019 07:34
-
-
Save FrankSpierings/412c5fe83b114fbac0f239878793151a to your computer and use it in GitHub Desktop.
Show the network range based on a IP (CIDR)
This file contains hidden or 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
from netaddr import IPNetwork | |
network = IPNetwork('192.168.21.2/26') | |
print('Network: {0} - {1}'.format(network.network, network.broadcast)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment