Merge branch 'feature/support-subnet-in-config' into feature/detect-cross-segment-traffic
# Conflicts: # infection_monkey/config.py
This commit is contained in:
commit
5f93f33128
|
@ -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 = ['', ]
|
||||||
inaccessible_subnet_groups = []
|
inaccessible_subnet_groups = []
|
||||||
|
|
||||||
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": [
|
||||||
""
|
""
|
||||||
],
|
],
|
||||||
"inaccessible_subnet_groups": [],
|
"inaccessible_subnet_groups": [],
|
||||||
|
|
|
@ -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"
|
||||||
}
|
},
|
||||||
}
|
"subnet_scan_list": {
|
||||||
},
|
|
||||||
"network_range": {
|
|
||||||
"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