Agent: Add comment to Ransomware.encrypt_files()

This commit is contained in:
Mike Salvatore 2022-03-25 10:55:13 -04:00
parent 593095cdcf
commit f67a455868
1 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,9 @@ class Ransomware:
for filepath in interruptible_iter(files_to_encrypt, interrupt, interrupted_message): for filepath in interruptible_iter(files_to_encrypt, interrupt, interrupted_message):
try: try:
logger.debug(f"Encrypting {filepath}") logger.debug(f"Encrypting {filepath}")
# Note that encrypting a single file is not interruptible. This is so that we avoid
# leaving half-encrypted files on the user's system.
self._encrypt_file(filepath) self._encrypt_file(filepath)
self._send_telemetry(filepath, True, "") self._send_telemetry(filepath, True, "")
except Exception as ex: except Exception as ex: