diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index 622c17d7d..a75304660 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -19,7 +19,7 @@ from infection_monkey.network.HostFinger import HostFinger from infection_monkey.network.network_scanner import NetworkScanner from infection_monkey.network.tools import get_interface_to_target, is_running_on_island from infection_monkey.post_breach.post_breach_handler import PostBreach -from infection_monkey.ransomware.ransomware_payload import RansomewarePayload +from infection_monkey.ransomware.ransomware_payload import RansomwarePayload from infection_monkey.system_info import SystemInfoCollector from infection_monkey.system_singleton import SystemSingleton from infection_monkey.telemetry.attack.t1106_telem import T1106Telem @@ -476,7 +476,7 @@ class InfectionMonkey(object): batching_telemetry_messenger = BatchingTelemetryMessenger(telemetry_messenger) try: - RansomewarePayload( + RansomwarePayload( WormConfiguration.ransomware, batching_telemetry_messenger ).run_payload() except Exception as ex: diff --git a/monkey/infection_monkey/ransomware/ransomware_payload.py b/monkey/infection_monkey/ransomware/ransomware_payload.py index 41631b227..9d85a48ea 100644 --- a/monkey/infection_monkey/ransomware/ransomware_payload.py +++ b/monkey/infection_monkey/ransomware/ransomware_payload.py @@ -19,7 +19,7 @@ README_SRC = Path(__file__).parent / "ransomware_readme.txt" README_DEST = "README.txt" -class RansomewarePayload: +class RansomwarePayload: def __init__(self, config: dict, telemetry_messenger: ITelemetryMessenger): target_directories = config["directories"] LOG.info( diff --git a/monkey/tests/unit_tests/infection_monkey/ransomware/test_ransomware_payload.py b/monkey/tests/unit_tests/infection_monkey/ransomware/test_ransomware_payload.py index 7bf819a6b..80677ecf2 100644 --- a/monkey/tests/unit_tests/infection_monkey/ransomware/test_ransomware_payload.py +++ b/monkey/tests/unit_tests/infection_monkey/ransomware/test_ransomware_payload.py @@ -22,11 +22,7 @@ from tests.unit_tests.infection_monkey.ransomware.ransomware_target_files import from tests.utils import hash_file, is_user_admin from infection_monkey.ransomware import ransomware_payload as ransomware_payload_module -from infection_monkey.ransomware.ransomware_payload import ( - EXTENSION, - README_DEST, - RansomewarePayload, -) +from infection_monkey.ransomware.ransomware_payload import EXTENSION, README_DEST, RansomwarePayload def with_extension(filename): @@ -43,7 +39,7 @@ def ransomware_payload_config(ransomware_target): @pytest.fixture def ransomware_payload(ransomware_payload_config, telemetry_messenger_spy): - return RansomewarePayload(ransomware_payload_config, telemetry_messenger_spy) + return RansomwarePayload(ransomware_payload_config, telemetry_messenger_spy) def test_file_with_excluded_extension_not_encrypted(ransomware_target, ransomware_payload): @@ -163,7 +159,7 @@ def test_telemetry_failure(monkeypatch, ransomware_payload, telemetry_messenger_ def test_readme_false(ransomware_payload_config, ransomware_target, telemetry_messenger_spy): ransomware_payload_config["other_behaviors"]["readme"] = False - ransomware_payload = RansomewarePayload(ransomware_payload_config, telemetry_messenger_spy) + ransomware_payload = RansomwarePayload(ransomware_payload_config, telemetry_messenger_spy) ransomware_payload.run_payload() assert not Path(ransomware_target / README_DEST).exists() @@ -171,7 +167,7 @@ def test_readme_false(ransomware_payload_config, ransomware_target, telemetry_me def test_readme_true(ransomware_payload_config, ransomware_target, telemetry_messenger_spy): ransomware_payload_config["other_behaviors"]["readme"] = True - ransomware_payload = RansomewarePayload(ransomware_payload_config, telemetry_messenger_spy) + ransomware_payload = RansomwarePayload(ransomware_payload_config, telemetry_messenger_spy) ransomware_payload.run_payload() assert Path(ransomware_target / README_DEST).exists()