ranger: show size and cleaned up cidr
This commit is contained in:
parent
409d26da5b
commit
a74abe29b2
|
@ -5,7 +5,7 @@ from netaddr import IPNetwork
|
|||
|
||||
def _run(cidr: str):
|
||||
net = IPNetwork(cidr)
|
||||
return f"{cidr} starts at {net.network} and ends at {net.broadcast}"
|
||||
return f"{net.cidr} starts at {net.network} and ends at {net.broadcast} with {net.size}"
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser("compute range from CIDR")
|
||||
|
|
Loading…
Reference in New Issue