forked from p15670423/monkey
Agent: Remove disused _wait_for_exploited_machine_connection()
This commit is contained in:
parent
84cb14e1c5
commit
63ed001a3e
|
@ -3,7 +3,6 @@ import logging
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import time
|
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
import infection_monkey.tunnel as tunnel
|
import infection_monkey.tunnel as tunnel
|
||||||
|
@ -244,7 +243,6 @@ class InfectionMonkey:
|
||||||
|
|
||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
logger.info("Monkey cleanup started")
|
logger.info("Monkey cleanup started")
|
||||||
self._wait_for_exploited_machine_connection()
|
|
||||||
try:
|
try:
|
||||||
if self._master:
|
if self._master:
|
||||||
self._master.cleanup()
|
self._master.cleanup()
|
||||||
|
@ -277,19 +275,6 @@ class InfectionMonkey:
|
||||||
|
|
||||||
logger.info("Monkey is shutting down")
|
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
|
@staticmethod
|
||||||
def _close_tunnel():
|
def _close_tunnel():
|
||||||
tunnel_address = (
|
tunnel_address = (
|
||||||
|
|
Loading…
Reference in New Issue