Agent: Add logging message about maximum depth reached

This commit is contained in:
vakarisz 2022-06-22 13:04:24 +03:00
parent 582328bea8
commit 734fc80c92
1 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,8 @@ import threading
import time import time
from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple
from utils.propagation import should_propagate
from common.utils import Timer from common.utils import Timer
from infection_monkey.credential_store import ICredentialsStore from infection_monkey.credential_store import ICredentialsStore
from infection_monkey.i_control_channel import IControlChannel, IslandCommunicationError 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.messengers.i_telemetry_messenger import ITelemetryMessenger
from infection_monkey.telemetry.post_breach_telem import PostBreachTelem from infection_monkey.telemetry.post_breach_telem import PostBreachTelem
from infection_monkey.utils.threading import create_daemon_thread, interruptible_iter from infection_monkey.utils.threading import create_daemon_thread, interruptible_iter
from utils.propagation import should_propagate
from . import Exploiter, IPScanner, Propagator from . import Exploiter, IPScanner, Propagator
from .option_parsing import custom_pba_is_enabled from .option_parsing import custom_pba_is_enabled
@ -175,6 +176,8 @@ class AutomatedMaster(IMaster):
if self._can_propagate(): if self._can_propagate():
self._propagator.propagate(config["propagation"], current_depth, self._stop) self._propagator.propagate(config["propagation"], current_depth, self._stop)
else:
logger.info("Skipping propagation, maximum depth reached")
payload_thread = create_daemon_thread( payload_thread = create_daemon_thread(
target=self._run_plugins, target=self._run_plugins,