rename and move range_fixed

This commit is contained in:
Itay Mizeretz 2018-02-26 16:34:23 +02:00
parent be54878ad9
commit 0de15736ac
5 changed files with 6 additions and 12 deletions

View File

@ -181,7 +181,7 @@ class Configuration(object):
# Auto detect and scan local subnets
local_network_scan = True
range_fixed = ['', ]
subnet_scan_list = ['', ]
blocked_ips = ['', ]

View File

@ -7,7 +7,7 @@
"www.google.com"
],
"keep_tunnel_open_time": 60,
"range_fixed": [
"subnet_scan_list": [
""
],
"blocked_ips": [""],

View File

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

View File

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

View File

@ -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():