From 8abb9d95cea438b202ba11766a4ecffe6c7960ba Mon Sep 17 00:00:00 2001 From: Shreya Date: Tue, 22 Jun 2021 18:06:14 +0530 Subject: [PATCH] agent: ransomware: Move VALID_FILE_EXTENSIONS_FOR_ENCRYPTION to separate file --- monkey/infection_monkey/ransomware/utils.py | 77 +------------------ .../ransomware/valid_file_extensions.py | 76 ++++++++++++++++++ 2 files changed, 77 insertions(+), 76 deletions(-) create mode 100644 monkey/infection_monkey/ransomware/valid_file_extensions.py diff --git a/monkey/infection_monkey/ransomware/utils.py b/monkey/infection_monkey/ransomware/utils.py index 2fd0052fb..8d4cbcc8a 100644 --- a/monkey/infection_monkey/ransomware/utils.py +++ b/monkey/infection_monkey/ransomware/utils.py @@ -1,82 +1,7 @@ import os from typing import List -VALID_FILE_EXTENSIONS_FOR_ENCRYPTION = { - ".3ds", - ".7z", - ".accdb", - ".ai", - ".asp", - ".aspx", - ".avhd", - ".avi", - ".back", - ".bak", - ".c", - ".cfg", - ".conf", - ".cpp", - ".cs", - ".ctl", - ".dbf", - ".disk", - ".djvu", - ".doc", - ".docx", - ".dwg", - ".eml", - ".fdb", - ".giff", - ".gz", - ".h", - ".hdd", - ".jpg", - ".jpeg", - ".kdbx", - ".mail", - ".mdb", - ".mpg", - ".mpeg", - ".msg", - ".nrg", - ".ora", - ".ost", - ".ova", - ".ovf", - ".pdf", - ".php", - ".pmf", - ".png", - ".ppt", - ".pptx", - ".pst", - ".pvi", - ".py", - ".pyc", - ".rar", - ".rtf", - ".sln", - ".sql", - ".tar", - ".tiff", - ".txt", - ".vbox", - ".vbs", - ".vcb", - ".vdi", - ".vfd", - ".vmc", - ".vmdk", - ".vmsd", - ".vmx", - ".vsdx", - ".vsv", - ".work", - ".xls", - ".xlsx", - ".xvd", - ".zip", -} +from infection_monkey.ransomware.valid_file_extensions import VALID_FILE_EXTENSIONS_FOR_ENCRYPTION def get_files_to_encrypt(dir_path: str) -> List[str]: diff --git a/monkey/infection_monkey/ransomware/valid_file_extensions.py b/monkey/infection_monkey/ransomware/valid_file_extensions.py new file mode 100644 index 000000000..f67a6b761 --- /dev/null +++ b/monkey/infection_monkey/ransomware/valid_file_extensions.py @@ -0,0 +1,76 @@ +VALID_FILE_EXTENSIONS_FOR_ENCRYPTION = { + ".3ds", + ".7z", + ".accdb", + ".ai", + ".asp", + ".aspx", + ".avhd", + ".avi", + ".back", + ".bak", + ".c", + ".cfg", + ".conf", + ".cpp", + ".cs", + ".ctl", + ".dbf", + ".disk", + ".djvu", + ".doc", + ".docx", + ".dwg", + ".eml", + ".fdb", + ".giff", + ".gz", + ".h", + ".hdd", + ".jpg", + ".jpeg", + ".kdbx", + ".mail", + ".mdb", + ".mpg", + ".mpeg", + ".msg", + ".nrg", + ".ora", + ".ost", + ".ova", + ".ovf", + ".pdf", + ".php", + ".pmf", + ".png", + ".ppt", + ".pptx", + ".pst", + ".pvi", + ".py", + ".pyc", + ".rar", + ".rtf", + ".sln", + ".sql", + ".tar", + ".tiff", + ".txt", + ".vbox", + ".vbs", + ".vcb", + ".vdi", + ".vfd", + ".vmc", + ".vmdk", + ".vmsd", + ".vmx", + ".vsdx", + ".vsv", + ".work", + ".xls", + ".xlsx", + ".xvd", + ".zip", +}