v0.2.5
ADDED: * num-addrs subcommand, to get the number of hosts/addresses in a given prefix length * get-net subcommand, to more easily get a single subnet from either the beginning or the end of a prefix. (MUCH FASTER than CIDR-splitting!)
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
`strings`
|
||||
|
||||
`github.com/TwiN/go-color`
|
||||
`github.com/projectdiscovery/mapcidr`
|
||||
`go4.org/netipx`
|
||||
`r00t2.io/subnetter/netsplit`
|
||||
)
|
||||
@@ -423,8 +422,8 @@ func tplTablePrefixes(ipVer uint8, indent string, plain bool) (out string, err e
|
||||
return
|
||||
}
|
||||
dummyNet = netipx.PrefixIPNet(rows[idx].NetPrefix.Masked())
|
||||
rows[idx].Addresses = mapcidr.CountIPsInCIDR(true, true, dummyNet)
|
||||
rows[idx].Hosts = mapcidr.CountIPsInCIDR(false, false, dummyNet)
|
||||
rows[idx].Addresses = netsplit.NumAddrsNet(dummyNet, true, true)
|
||||
rows[idx].Hosts = netsplit.NumAddrsNet(dummyNet, false, false)
|
||||
}
|
||||
|
||||
colFields, colTitles, colSizes = sizeStructs(rows)
|
||||
|
||||
Reference in New Issue
Block a user