From 7eb2a5c98b26697a29870f051e04eb3fb0840c64 Mon Sep 17 00:00:00 2001 From: Daniel Goldberg Date: Thu, 12 Apr 2018 14:57:22 +0300 Subject: [PATCH] Remove class C limitation when getting local subnet --- infection_monkey/network/info.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/infection_monkey/network/info.py b/infection_monkey/network/info.py index 7c208dce4..179befd4f 100644 --- a/infection_monkey/network/info.py +++ b/infection_monkey/network/info.py @@ -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