forked from p15670423/monkey
agent: Fix incorrect config in ransomware payload
This commit is contained in:
parent
1294e38f6e
commit
3d403a92e8
|
@ -17,10 +17,17 @@ CHUNK_SIZE = 4096 * 24
|
||||||
|
|
||||||
class RansomewarePayload:
|
class RansomewarePayload:
|
||||||
def __init__(self, config: dict, telemetry_messenger: ITelemetryMessenger):
|
def __init__(self, config: dict, telemetry_messenger: ITelemetryMessenger):
|
||||||
LOG.info(f"Windows dir configured for encryption is \"{config['windows_dir']}\"")
|
target_directories = config["directories"]
|
||||||
LOG.info(f"Linux dir configured for encryption is \"{config['linux_dir']}\"")
|
LOG.info(
|
||||||
|
f"Windows dir configured for encryption is \"{target_directories['windows_dir']}\""
|
||||||
|
)
|
||||||
|
LOG.info(f"Linux dir configured for encryption is \"{target_directories['linux_dir']}\"")
|
||||||
|
|
||||||
self._target_dir = config["windows_dir"] if is_windows_os() else config["linux_dir"]
|
self._target_dir = (
|
||||||
|
target_directories["windows_dir"]
|
||||||
|
if is_windows_os()
|
||||||
|
else target_directories["linux_dir"]
|
||||||
|
)
|
||||||
|
|
||||||
self._new_file_extension = EXTENSION
|
self._new_file_extension = EXTENSION
|
||||||
self._valid_file_extensions_for_encryption = VALID_FILE_EXTENSIONS_FOR_ENCRYPTION.copy()
|
self._valid_file_extensions_for_encryption = VALID_FILE_EXTENSIONS_FOR_ENCRYPTION.copy()
|
||||||
|
|
|
@ -41,7 +41,9 @@ def with_extension(filename):
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def ransomware_payload_config(ransomware_target):
|
def ransomware_payload_config(ransomware_target):
|
||||||
return {"linux_dir": str(ransomware_target), "windows_dir": str(ransomware_target)}
|
return {
|
||||||
|
"directories": {"linux_dir": str(ransomware_target), "windows_dir": str(ransomware_target)}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
Loading…
Reference in New Issue