From aac8638df2c5feeb2120fe4f2497ee30fa4b8ea1 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 15 Mar 2022 13:27:21 -0400 Subject: [PATCH] Agent: Remove disused get_interfaces_ranges() --- monkey/infection_monkey/network/info.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/monkey/infection_monkey/network/info.py b/monkey/infection_monkey/network/info.py index f546116cb..162fb423b 100644 --- a/monkey/infection_monkey/network/info.py +++ b/monkey/infection_monkey/network/info.py @@ -9,7 +9,6 @@ from typing import List import netifaces import psutil -from common.network.network_range import CidrRange from infection_monkey.utils.environment import is_windows_os # Timeout for monkey connections @@ -136,19 +135,3 @@ def get_free_tcp_port(min_range=1024, max_range=65535): return port return None - - -def get_interfaces_ranges(): - """ - Returns a list of IPs accessible in the host in each network interface, in the subnet. - Limits to a single class C if the network is larger - :return: List of IPs, marked as strings. - """ - res = [] - ifs = get_host_subnets() - for net_interface in ifs: - address_str = net_interface["addr"] - netmask_str = net_interface["netmask"] - # limit subnet scans to class C only - res.append(CidrRange(cidr_range="%s/%s" % (address_str, netmask_str))) - return res