Agent: Remove disused get_interfaces_ranges()

This commit is contained in:
Mike Salvatore 2022-03-15 13:27:21 -04:00
parent 4cf448ebe1
commit aac8638df2
1 changed files with 0 additions and 17 deletions

View File

@ -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