agent: Sort files in ransomware payload's `_find_files()` before returning
This commit is contained in:
parent
3b80221c38
commit
e5160a5fb4
|
@ -70,7 +70,9 @@ class RansomwarePayload:
|
||||||
|
|
||||||
def _find_files(self) -> List[Path]:
|
def _find_files(self) -> List[Path]:
|
||||||
LOG.info(f"Collecting files in {self._target_dir}")
|
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]]]:
|
def _encrypt_files(self, file_list: List[Path]) -> List[Tuple[Path, Optional[Exception]]]:
|
||||||
LOG.info(f"Encrypting files in {self._target_dir}")
|
LOG.info(f"Encrypting files in {self._target_dir}")
|
||||||
|
|
Loading…
Reference in New Issue