Rename {windows,linux}_dir to *_target_dir for consistency

This commit is contained in:
Mike Salvatore 2021-06-30 07:29:53 -04:00
parent 9a58d5bc7a
commit 946641f9a2
3 changed files with 10 additions and 8 deletions

View File

@ -28,14 +28,16 @@ class RansomwarePayload:
target_directories = config["encryption"]["directories"] target_directories = config["encryption"]["directories"]
LOG.info( LOG.info(
f"Windows dir configured for encryption is \"{target_directories['windows_dir']}\"" "Windows dir configured for encryption is " + target_directories["windows_target_dir"]
)
LOG.info(
f"Linux dir configured for encryption is \"{target_directories['linux_target_dir']}\""
) )
LOG.info(f"Linux dir configured for encryption is \"{target_directories['linux_dir']}\"")
self._target_dir = ( self._target_dir = (
target_directories["windows_dir"] target_directories["windows_target_dir"]
if is_windows_os() if is_windows_os()
else target_directories["linux_dir"] else target_directories["linux_target_dir"]
) )
self._readme_enabled = config["other_behaviors"]["readme"] self._readme_enabled = config["other_behaviors"]["readme"]

View File

@ -17,7 +17,7 @@ RANSOMWARE = {
"title": "Directories to encrypt", "title": "Directories to encrypt",
"type": "object", "type": "object",
"properties": { "properties": {
"linux_dir": { "linux_target_dir": {
"title": "Linux target directory", "title": "Linux target directory",
"type": "string", "type": "string",
"default": "", "default": "",
@ -25,7 +25,7 @@ RANSOMWARE = {
"used to safely simulate the encryption behavior of ransomware. If no " "used to safely simulate the encryption behavior of ransomware. If no "
"directory is specified, no files will be encrypted.", "directory is specified, no files will be encrypted.",
}, },
"windows_dir": { "windows_target_dir": {
"title": "Windows target directory", "title": "Windows target directory",
"type": "string", "type": "string",
"default": "", "default": "",

View File

@ -35,8 +35,8 @@ def ransomware_payload_config(ransomware_target):
"encryption": { "encryption": {
"enabled": True, "enabled": True,
"directories": { "directories": {
"linux_dir": str(ransomware_target), "linux_target_dir": str(ransomware_target),
"windows_dir": str(ransomware_target), "windows_target_dir": str(ransomware_target),
}, },
}, },
"other_behaviors": {"readme": False}, "other_behaviors": {"readme": False},