From f67a4558686cd03daf61e9478179c903ea4b5f5c Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 25 Mar 2022 10:55:13 -0400 Subject: [PATCH] Agent: Add comment to Ransomware.encrypt_files() --- monkey/infection_monkey/payload/ransomware/ransomware.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/monkey/infection_monkey/payload/ransomware/ransomware.py b/monkey/infection_monkey/payload/ransomware/ransomware.py index e77c5b0b5..47d4c0f89 100644 --- a/monkey/infection_monkey/payload/ransomware/ransomware.py +++ b/monkey/infection_monkey/payload/ransomware/ransomware.py @@ -60,6 +60,9 @@ class Ransomware: for filepath in interruptible_iter(files_to_encrypt, interrupt, interrupted_message): try: 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._send_telemetry(filepath, True, "") except Exception as ex: