Agent: Rename _valid_file_extensions... -> _targeted_file_extensions

This commit is contained in:
Mike Salvatore 2021-07-08 12:15:37 -04:00
parent 24fdb9e299
commit bb554d923d
1 changed files with 3 additions and 5 deletions

View File

@ -34,8 +34,8 @@ class RansomwarePayload:
self._target_dir = RansomwarePayload.get_target_dir(config) self._target_dir = RansomwarePayload.get_target_dir(config)
self._new_file_extension = EXTENSION self._new_file_extension = EXTENSION
self._valid_file_extensions_for_encryption = TARGETED_FILE_EXTENSIONS.copy() self._targeted_file_extensions = TARGETED_FILE_EXTENSIONS.copy()
self._valid_file_extensions_for_encryption.discard(self._new_file_extension) self._targeted_file_extensions.discard(self._new_file_extension)
self._encryptor = BitflipEncryptor(chunk_size=CHUNK_SIZE) self._encryptor = BitflipEncryptor(chunk_size=CHUNK_SIZE)
self._copy_file = copy_file self._copy_file = copy_file
@ -68,9 +68,7 @@ class RansomwarePayload:
if not self._target_dir: if not self._target_dir:
return [] return []
return select_production_safe_target_files( return select_production_safe_target_files(self._target_dir, self._targeted_file_extensions)
self._target_dir, self._valid_file_extensions_for_encryption
)
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}")