From 63ed001a3ef1c5e94a2713726351f55d554107b8 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 2 Mar 2022 10:07:12 -0500 Subject: [PATCH] Agent: Remove disused _wait_for_exploited_machine_connection() --- monkey/infection_monkey/monkey.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index bd11a38c4..cb1c47f6d 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -3,7 +3,6 @@ import logging import os import subprocess import sys -import time from typing import List import infection_monkey.tunnel as tunnel @@ -244,7 +243,6 @@ class InfectionMonkey: def cleanup(self): logger.info("Monkey cleanup started") - self._wait_for_exploited_machine_connection() try: if self._master: self._master.cleanup() @@ -277,19 +275,6 @@ class InfectionMonkey: logger.info("Monkey is shutting down") - def _wait_for_exploited_machine_connection(self): - # TODO check for actual exploitation - machines_exploited = False - # if host was exploited, before continue to closing the tunnel ensure the exploited - # host had its chance to - # connect to the tunnel - if machines_exploited: - time_to_sleep = WormConfiguration.keep_tunnel_open_time - logger.info( - "Sleeping %d seconds for exploited machines to connect to tunnel", time_to_sleep - ) - time.sleep(time_to_sleep) - @staticmethod def _close_tunnel(): tunnel_address = (