From 734fc80c92bcec76efd82e9e54dd28e323279771 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Wed, 22 Jun 2022 13:04:24 +0300 Subject: [PATCH] Agent: Add logging message about maximum depth reached --- monkey/infection_monkey/master/automated_master.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/master/automated_master.py b/monkey/infection_monkey/master/automated_master.py index 780e07b6f..7fd943932 100644 --- a/monkey/infection_monkey/master/automated_master.py +++ b/monkey/infection_monkey/master/automated_master.py @@ -3,6 +3,8 @@ import threading import time from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple +from utils.propagation import should_propagate + from common.utils import Timer from infection_monkey.credential_store import ICredentialsStore from infection_monkey.i_control_channel import IControlChannel, IslandCommunicationError @@ -14,7 +16,6 @@ from infection_monkey.telemetry.credentials_telem import CredentialsTelem from infection_monkey.telemetry.messengers.i_telemetry_messenger import ITelemetryMessenger from infection_monkey.telemetry.post_breach_telem import PostBreachTelem from infection_monkey.utils.threading import create_daemon_thread, interruptible_iter -from utils.propagation import should_propagate from . import Exploiter, IPScanner, Propagator from .option_parsing import custom_pba_is_enabled @@ -175,6 +176,8 @@ class AutomatedMaster(IMaster): if self._can_propagate(): self._propagator.propagate(config["propagation"], current_depth, self._stop) + else: + logger.info("Skipping propagation, maximum depth reached") payload_thread = create_daemon_thread( target=self._run_plugins,