forked from p15670423/monkey
Remove class C limitation when getting local subnet
This commit is contained in:
parent
dcbcc34af0
commit
7eb2a5c98b
|
@ -143,10 +143,7 @@ def get_interfaces_ranges():
|
|||
netmask_str = net_interface['netmask']
|
||||
ip_interface = ipaddress.ip_interface(u"%s/%s" % (address_str, netmask_str))
|
||||
# limit subnet scans to class C only
|
||||
if ip_interface.network.num_addresses > 255:
|
||||
res.append(CidrRange(cidr_range="%s/24" % (address_str, )))
|
||||
else:
|
||||
res.append(CidrRange(cidr_range="%s/%s" % (address_str, netmask_str)))
|
||||
res.append(CidrRange(cidr_range="%s/%s" % (address_str, netmask_str)))
|
||||
return res
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue