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)