From 153d65eca0bec04bd071a9e372e98f9825b100d4 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Tue, 15 Mar 2022 16:59:26 +0100 Subject: [PATCH] Agent: User current_depth instead of get_monkey_depth() in PowerShell --- monkey/infection_monkey/exploit/powershell.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/infection_monkey/exploit/powershell.py b/monkey/infection_monkey/exploit/powershell.py index 7a46f8cc2..fa4ec74e1 100644 --- a/monkey/infection_monkey/exploit/powershell.py +++ b/monkey/infection_monkey/exploit/powershell.py @@ -20,7 +20,7 @@ from infection_monkey.exploit.powershell_utils.powershell_client import ( IPowerShellClient, PowerShellClient, ) -from infection_monkey.exploit.tools.helpers import get_monkey_depth, get_random_file_suffix +from infection_monkey.exploit.tools.helpers import get_random_file_suffix from infection_monkey.model import DROPPER_ARG, RUN_MONKEY, VictimHost from infection_monkey.utils.commands import build_monkey_commandline from infection_monkey.utils.environment import is_windows_os @@ -196,7 +196,7 @@ class PowerShellExploiter(HostExploiter): def _run_monkey_executable_on_victim(self, executable_path): monkey_execution_command = build_monkey_execution_command( - self.host, get_monkey_depth() - 1, executable_path + self.host, self.current_depth - 1, executable_path ) logger.info(