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 # Auto detect and scan local subnets
local_network_scan = True local_network_scan = True
range_fixed = ['', ] subnet_scan_list = ['', ]
blocked_ips = ['', ] blocked_ips = ['', ]

View File

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

View File

@ -32,7 +32,7 @@ class NetworkScanner(object):
LOG.info("Found local IP addresses of the machine: %r", self._ip_addresses) LOG.info("Found local IP addresses of the machine: %r", self._ip_addresses)
# for fixed range, only scan once. # 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: if WormConfiguration.local_network_scan:
self._ranges += get_interfaces_ranges() self._ranges += get_interfaces_ranges()
LOG.info("Base local networks to scan are: %r", self._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. " "Amount of hops allowed for the monkey to spread from the island. "
+ WARNING_SIGN + WARNING_SIGN
+ " Note that setting this value too high may result in the monkey propagating too far" + " Note that setting this value too high may result in the monkey propagating too far"
}
}
}, },
"network_range": { "subnet_scan_list": {
"title": "Network range",
"type": "object",
"properties": {
"range_fixed": {
"title": "Scan IP/subnet list", "title": "Scan IP/subnet list",
"type": "array", "type": "array",
"uniqueItems": True, "uniqueItems": True,

View File

@ -315,7 +315,7 @@ class ReportService:
@staticmethod @staticmethod
def get_config_ips(): 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 @staticmethod
def get_config_scan(): def get_config_scan():