diff --git a/monkey/infection_monkey/ransomware/ransomware_payload.py b/monkey/infection_monkey/ransomware/ransomware_payload.py index 9324542ad..f4295f866 100644 --- a/monkey/infection_monkey/ransomware/ransomware_payload.py +++ b/monkey/infection_monkey/ransomware/ransomware_payload.py @@ -70,7 +70,9 @@ class RansomwarePayload: def _find_files(self) -> List[Path]: LOG.info(f"Collecting files in {self._target_dir}") - return select_production_safe_target_files(self._target_dir, self._targeted_file_extensions) + return sorted( + select_production_safe_target_files(self._target_dir, self._targeted_file_extensions) + ) def _encrypt_files(self, file_list: List[Path]) -> List[Tuple[Path, Optional[Exception]]]: LOG.info(f"Encrypting files in {self._target_dir}")