From b58c4ea62214a2421593b1e14123377f8747427c Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Tue, 17 Oct 2017 11:55:27 +0300 Subject: [PATCH] Remove relative range option from config --- chaos_monkey/config.py | 1 - chaos_monkey/example.conf | 1 - chaos_monkey/network/range.py | 2 +- monkey_island/cc/services/config.py | 11 ----------- 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/chaos_monkey/config.py b/chaos_monkey/config.py index e1d830978..e62820816 100644 --- a/chaos_monkey/config.py +++ b/chaos_monkey/config.py @@ -183,7 +183,6 @@ class Configuration(object): local_network_scan = True range_class = FixedRange - range_size = 1 range_fixed = ['', ] blocked_ips = ['', ] diff --git a/chaos_monkey/example.conf b/chaos_monkey/example.conf index 05e8f0f5a..6f70f888a 100644 --- a/chaos_monkey/example.conf +++ b/chaos_monkey/example.conf @@ -52,7 +52,6 @@ "ms08_067_remote_user_add": "Monkey_IUSER_SUPPORT", "ms08_067_remote_user_pass": "Password1!", "ping_scan_timeout": 10000, - "range_size": 30, "rdp_use_vbs_download": true, "smb_download_timeout": 300, "smb_service_name": "InfectionMonkey", diff --git a/chaos_monkey/network/range.py b/chaos_monkey/network/range.py index 5163a6aad..fdd29bc09 100644 --- a/chaos_monkey/network/range.py +++ b/chaos_monkey/network/range.py @@ -45,7 +45,7 @@ class RelativeRange(NetworkRange): def __init__(self, base_address, shuffle=True): base_address = struct.unpack(">L", socket.inet_aton(base_address))[0] super(RelativeRange, self).__init__(base_address, shuffle=shuffle) - self._size = self._config.range_size + self._size = 1 def __repr__(self): return "" % (socket.inet_ntoa(struct.pack(">L", self._base_address - self._size)), diff --git a/monkey_island/cc/services/config.py b/monkey_island/cc/services/config.py index 7f7f0a227..700982164 100644 --- a/monkey_island/cc/services/config.py +++ b/monkey_island/cc/services/config.py @@ -208,28 +208,17 @@ SCHEMA = { "default": "FixedRange", "enum": [ "FixedRange", - "RelativeRange", "ClassCRange" ], "enumNames": [ "Fixed Range", - "Relative Range", "Class C Range" ], "description": "Determines which class to use to determine scan range." " Fixed Range will scan only specific IPs listed under Fixed range IP list." - " Relative Range will scan the closest ips to the machine's IP." " Class C Range will scan machines in the Class C network the monkey's on." }, - "range_size": { - "title": "Relative range size", - "type": "integer", - "default": 1, - "description": - "Determines the size of the RelativeRange - amount of IPs to scan" - " (Only relevant for Relative Range)" - }, "range_fixed": { "title": "Fixed range IP list", "type": "array",