forked from p15670423/monkey
Agent: Rename readme_utils to readme_dropper
This commit is contained in:
parent
8ae41907ba
commit
7966703f63
|
@ -1,7 +1,7 @@
|
|||
import logging
|
||||
from pprint import pformat
|
||||
|
||||
from infection_monkey.ransomware import ransomware_payload, readme_utils
|
||||
from infection_monkey.ransomware import ransomware_payload, readme_dropper
|
||||
from infection_monkey.ransomware.file_selectors import ProductionSafeTargetFileSelector
|
||||
from infection_monkey.ransomware.in_place_file_encryptor import InPlaceFileEncryptor
|
||||
from infection_monkey.ransomware.ransomware_config import RansomwareConfig
|
||||
|
@ -27,13 +27,14 @@ def build_ransomware_payload(config: dict):
|
|||
|
||||
file_encryptor = _build_file_encryptor()
|
||||
file_selector = _build_file_selector()
|
||||
leave_readme = _build_leave_readme()
|
||||
telemetry_messenger = _build_telemetry_messenger()
|
||||
|
||||
return RansomwarePayload(
|
||||
ransomware_config,
|
||||
file_encryptor,
|
||||
file_selector,
|
||||
readme_utils.leave_readme,
|
||||
leave_readme,
|
||||
telemetry_messenger,
|
||||
)
|
||||
|
||||
|
@ -51,6 +52,10 @@ def _build_file_selector():
|
|||
return ProductionSafeTargetFileSelector(targeted_file_extensions)
|
||||
|
||||
|
||||
def _build_leave_readme():
|
||||
return readme_dropper.leave_readme
|
||||
|
||||
|
||||
def _build_telemetry_messenger():
|
||||
telemetry_messenger = LegacyTelemetryMessengerAdapter()
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import pytest
|
||||
from tests.utils import hash_file
|
||||
|
||||
from infection_monkey.ransomware.readme_utils import leave_readme
|
||||
from infection_monkey.ransomware.readme_dropper import leave_readme
|
||||
|
||||
DEST_FILE = "README.TXT"
|
||||
README_HASH = "c98c24b677eff44860afea6f493bbaec5bb1c4cbb209c6fc2bbb47f66ff2ad31"
|
Loading…
Reference in New Issue