From 62a6b09e006a3060d4cd93e0286beb31f38d6cfd Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 30 Nov 2021 10:59:18 -0500 Subject: [PATCH] Agent: Use `self._target_directory` in RansomwarePayload --- monkey/infection_monkey/ransomware/ransomware_payload.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/monkey/infection_monkey/ransomware/ransomware_payload.py b/monkey/infection_monkey/ransomware/ransomware_payload.py index ef5a28289..afa4ffe25 100644 --- a/monkey/infection_monkey/ransomware/ransomware_payload.py +++ b/monkey/infection_monkey/ransomware/ransomware_payload.py @@ -33,7 +33,7 @@ class RansomwarePayload: self._readme_incomplete = False def run_payload(self): - if not self._config.target_directory: + if not self._target_directory: return logger.info("Running ransomware payload") @@ -46,11 +46,11 @@ class RansomwarePayload: self._leave_readme_in_target_directory() def _find_files(self) -> List[Path]: - logger.info(f"Collecting files in {self._config.target_directory}") - return sorted(self._select_files(self._config.target_directory)) + logger.info(f"Collecting files in {self._target_directory}") + return sorted(self._select_files(self._target_directory)) def _encrypt_files(self, file_list: List[Path]): - logger.info(f"Encrypting files in {self._config.target_directory}") + logger.info(f"Encrypting files in {self._target_directory}") for filepath in file_list: try: