From d3beebf99553f9c16287ce67582513d952e93a7f Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Wed, 7 Jul 2021 11:41:42 +0300 Subject: [PATCH] Change ransomware_payload.py to not encrypt files in CWD if no directory was specified --- monkey/infection_monkey/ransomware/ransomware_payload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/infection_monkey/ransomware/ransomware_payload.py b/monkey/infection_monkey/ransomware/ransomware_payload.py index 0cf8d77ec..56fd6f07f 100644 --- a/monkey/infection_monkey/ransomware/ransomware_payload.py +++ b/monkey/infection_monkey/ransomware/ransomware_payload.py @@ -50,7 +50,7 @@ class RansomwarePayload: return None def run_payload(self): - if self._encryption_enabled: + if self._encryption_enabled and self._target_dir: LOG.info("Running ransomware payload") file_list = self._find_files() self._encrypt_files(file_list)