forked from p15670423/monkey
Agent: Use `find_servers` to pass valid server to `ControlClient`
This commit is contained in:
parent
18659b654f
commit
94dc8cf377
|
@ -96,9 +96,11 @@ class InfectionMonkey:
|
|||
logger.info("Monkey is initializing...")
|
||||
self._singleton = SystemSingleton()
|
||||
self._opts = self._get_arguments(args)
|
||||
# TODO: Change address to ip port to use list of servers
|
||||
self._cmd_island_ip, self._cmd_island_port = address_to_ip_port(self._opts.servers)
|
||||
self._control_client = ControlClient(self._opts.servers)
|
||||
|
||||
server = find_server(self._opts.servers)
|
||||
self._cmd_island_ip, self._cmd_island_port = address_to_ip_port(server)
|
||||
self._control_client = ControlClient(server_address=server)
|
||||
|
||||
# TODO Refactor the telemetry messengers to accept control client
|
||||
# and remove control_client_object
|
||||
ControlClient.control_client_object = self._control_client
|
||||
|
|
Loading…
Reference in New Issue