forked from p34709852/monkey
Agent: Remove default servers from WormConfiguration.command_servers
In my 16 months working on this project, the default server included in WormConfiguration.command_servers has never had a Monkey Island running on it. This adds a 30 second delay to each hop in the tunneling test as the agent attempts to contact this bogus IP. Removing it speeds up propagation and also avoids unintended consequences if a user has a different service running on 192.0.2.0:5000.
This commit is contained in:
parent
996f2b3c7a
commit
ef134be044
|
@ -85,7 +85,7 @@ class Configuration(object):
|
|||
current_server = ""
|
||||
|
||||
# Configuration servers to try to connect to, in this order.
|
||||
command_servers = ["192.0.2.0:5000"]
|
||||
command_servers = []
|
||||
|
||||
keep_tunnel_open_time = 60
|
||||
|
||||
|
|
|
@ -120,13 +120,8 @@ class InfectionMonkey:
|
|||
@staticmethod
|
||||
def _add_default_server_to_config(default_server: str):
|
||||
if default_server:
|
||||
if default_server not in WormConfiguration.command_servers:
|
||||
logger.debug("Added default server: %s" % default_server)
|
||||
WormConfiguration.command_servers.insert(0, default_server)
|
||||
else:
|
||||
logger.debug(
|
||||
"Default server: %s is already in command servers list" % default_server
|
||||
)
|
||||
logger.debug("Added default server: %s" % default_server)
|
||||
WormConfiguration.command_servers.insert(0, default_server)
|
||||
|
||||
def _connect_to_island(self):
|
||||
# Sets island's IP and port for monkey to communicate to
|
||||
|
|
Loading…
Reference in New Issue