From 0de15736ac54c68061f88d6471d74b4df598e131 Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Mon, 26 Feb 2018 16:34:23 +0200 Subject: [PATCH] rename and move range_fixed --- infection_monkey/config.py | 2 +- infection_monkey/example.conf | 2 +- infection_monkey/network/network_scanner.py | 2 +- monkey_island/cc/services/config.py | 10 ++-------- monkey_island/cc/services/report.py | 2 +- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/infection_monkey/config.py b/infection_monkey/config.py index b9a597f8b..d4710f906 100644 --- a/infection_monkey/config.py +++ b/infection_monkey/config.py @@ -181,7 +181,7 @@ class Configuration(object): # Auto detect and scan local subnets local_network_scan = True - range_fixed = ['', ] + subnet_scan_list = ['', ] blocked_ips = ['', ] diff --git a/infection_monkey/example.conf b/infection_monkey/example.conf index b100cf111..852c366d0 100644 --- a/infection_monkey/example.conf +++ b/infection_monkey/example.conf @@ -7,7 +7,7 @@ "www.google.com" ], "keep_tunnel_open_time": 60, - "range_fixed": [ + "subnet_scan_list": [ "" ], "blocked_ips": [""], diff --git a/infection_monkey/network/network_scanner.py b/infection_monkey/network/network_scanner.py index a62f4950e..7bdddc904 100644 --- a/infection_monkey/network/network_scanner.py +++ b/infection_monkey/network/network_scanner.py @@ -32,7 +32,7 @@ class NetworkScanner(object): LOG.info("Found local IP addresses of the machine: %r", self._ip_addresses) # for fixed range, only scan once. - self._ranges = [NetworkRange.get_range_obj(address_str=x) for x in WormConfiguration.range_fixed] + self._ranges = [NetworkRange.get_range_obj(address_str=x) for x in WormConfiguration.subnet_scan_list] if WormConfiguration.local_network_scan: self._ranges += get_interfaces_ranges() LOG.info("Base local networks to scan are: %r", self._ranges) diff --git a/monkey_island/cc/services/config.py b/monkey_island/cc/services/config.py index 133890760..a4b31728d 100644 --- a/monkey_island/cc/services/config.py +++ b/monkey_island/cc/services/config.py @@ -198,14 +198,8 @@ SCHEMA = { "Amount of hops allowed for the monkey to spread from the island. " + WARNING_SIGN + " Note that setting this value too high may result in the monkey propagating too far" - } - } - }, - "network_range": { - "title": "Network range", - "type": "object", - "properties": { - "range_fixed": { + }, + "subnet_scan_list": { "title": "Scan IP/subnet list", "type": "array", "uniqueItems": True, diff --git a/monkey_island/cc/services/report.py b/monkey_island/cc/services/report.py index 848b572bc..250acc17a 100644 --- a/monkey_island/cc/services/report.py +++ b/monkey_island/cc/services/report.py @@ -315,7 +315,7 @@ class ReportService: @staticmethod def get_config_ips(): - return ConfigService.get_config_value(['basic_network', 'network_range', 'range_fixed'], True) + return ConfigService.get_config_value(['basic_network', 'general', 'subnet_scan_list'], True) @staticmethod def get_config_scan():