Agent: User relative imports within ransomware package
This commit is contained in:
parent
c18af3c3fb
commit
09a1297f47
|
@ -2,7 +2,6 @@ from pathlib import Path
|
|||
from typing import List, Set
|
||||
|
||||
from common.utils.file_utils import get_file_sha256_hash
|
||||
from infection_monkey.ransomware.consts import README_FILE_NAME, README_SHA256_HASH
|
||||
from infection_monkey.utils.dir_utils import (
|
||||
file_extension_filter,
|
||||
filter_files,
|
||||
|
@ -11,6 +10,8 @@ from infection_monkey.utils.dir_utils import (
|
|||
is_not_symlink_filter,
|
||||
)
|
||||
|
||||
from .consts import README_FILE_NAME, README_SHA256_HASH
|
||||
|
||||
|
||||
class ProductionSafeTargetFileSelector:
|
||||
def __init__(self, targeted_file_extensions: Set[str]):
|
||||
|
|
|
@ -2,11 +2,12 @@ import logging
|
|||
from pathlib import Path
|
||||
from typing import Callable, List
|
||||
|
||||
from infection_monkey.ransomware.consts import README_FILE_NAME, README_SRC
|
||||
from infection_monkey.ransomware.ransomware_config import RansomwareConfig
|
||||
from infection_monkey.telemetry.file_encryption_telem import FileEncryptionTelem
|
||||
from infection_monkey.telemetry.messengers.i_telemetry_messenger import ITelemetryMessenger
|
||||
|
||||
from .consts import README_FILE_NAME, README_SRC
|
||||
from .ransomware_config import RansomwareConfig
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
import logging
|
||||
from pprint import pformat
|
||||
|
||||
from infection_monkey.ransomware import 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
|
||||
from infection_monkey.ransomware.ransomware_payload import RansomwarePayload
|
||||
from infection_monkey.ransomware.targeted_file_extensions import TARGETED_FILE_EXTENSIONS
|
||||
from infection_monkey.telemetry.messengers.batching_telemetry_messenger import (
|
||||
BatchingTelemetryMessenger,
|
||||
)
|
||||
|
@ -15,6 +9,13 @@ from infection_monkey.telemetry.messengers.legacy_telemetry_messenger_adapter im
|
|||
)
|
||||
from infection_monkey.utils.bit_manipulators import flip_bits
|
||||
|
||||
from . import readme_dropper
|
||||
from .file_selectors import ProductionSafeTargetFileSelector
|
||||
from .in_place_file_encryptor import InPlaceFileEncryptor
|
||||
from .ransomware_config import RansomwareConfig
|
||||
from .ransomware_payload import RansomwarePayload
|
||||
from .targeted_file_extensions import TARGETED_FILE_EXTENSIONS
|
||||
|
||||
EXTENSION = ".m0nk3y"
|
||||
CHUNK_SIZE = 4096 * 24
|
||||
|
||||
|
|
Loading…
Reference in New Issue