ipcalc
ipcalc copied to clipboard
truncated network names are not correctly handled
for example the nestat -nr
command on OSX outputs truncated network names where for example 10.255/20
is considered to be equivalent of 10.255.0.0/20
. For ipcalc these are not treated equally:
>>> n = ipcalc.Network("10.255/20")
>>> n.host_first(), n.host_last()
(IP('10.0.0.1'), IP('10.0.15.254'))
>>> n = ipcalc.Network("10.255.0.0/20")
>>> n.host_first(), n.host_last()
(IP('10.255.0.1'), IP('10.255.15.254'))
(python-env)date:~ noa$ pip list |grep ipcalc
ipcalc (1.1.3)