forked from p34709852/monkey
rename and move range_fixed
This commit is contained in:
parent
be54878ad9
commit
0de15736ac
|
@ -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 = ['', ]
|
||||||
|
|
||||||
|
|
|
@ -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": [""],
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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():
|
||||||
|
|
Loading…
Reference in New Issue