Common: Rename configuration package to agent_configuration
This commit is contained in:
parent
dd80e24112
commit
81101d4213
|
@ -5,7 +5,7 @@ from typing import Union
|
|||
|
||||
from bson import json_util
|
||||
|
||||
from common.configuration import AgentConfiguration
|
||||
from common.agent_configuration import AgentConfiguration
|
||||
from common.credentials import Credentials
|
||||
from envs.monkey_zoo.blackbox.island_client.monkey_island_requests import MonkeyIslandRequests
|
||||
from envs.monkey_zoo.blackbox.test_configurations.test_configuration import TestConfiguration
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from common.configuration import AgentConfiguration, PluginConfiguration
|
||||
from common.agent_configuration import AgentConfiguration, PluginConfiguration
|
||||
from common.credentials import Credentials, Password, Username
|
||||
|
||||
from .noop import noop_test_configuration
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from common.configuration import AgentConfiguration, PluginConfiguration
|
||||
from common.agent_configuration import AgentConfiguration, PluginConfiguration
|
||||
from common.credentials import Credentials, Password, Username
|
||||
|
||||
from .noop import noop_test_configuration
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from common.configuration import AgentConfiguration, PluginConfiguration
|
||||
from common.agent_configuration import AgentConfiguration, PluginConfiguration
|
||||
from common.credentials import Credentials, NTHash, Password, Username
|
||||
|
||||
from .noop import noop_test_configuration
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from common.configuration import (
|
||||
from common.agent_configuration import (
|
||||
AgentConfiguration,
|
||||
CustomPBAConfiguration,
|
||||
ExploitationConfiguration,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from common.configuration import AgentConfiguration, PluginConfiguration
|
||||
from common.agent_configuration import AgentConfiguration, PluginConfiguration
|
||||
|
||||
from .noop import noop_test_configuration
|
||||
from .utils import (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from common.configuration import AgentConfiguration, PluginConfiguration
|
||||
from common.agent_configuration import AgentConfiguration, PluginConfiguration
|
||||
from common.credentials import Credentials, NTHash, Password, Username
|
||||
|
||||
from .noop import noop_test_configuration
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from dataclasses import dataclass
|
||||
from typing import Tuple
|
||||
|
||||
from common.configuration import AgentConfiguration
|
||||
from common.agent_configuration import AgentConfiguration
|
||||
from common.credentials import Credentials
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from dataclasses import replace
|
||||
from typing import Sequence, Tuple
|
||||
|
||||
from common.configuration import (
|
||||
from common.agent_configuration import (
|
||||
AgentConfiguration,
|
||||
ExploitationConfiguration,
|
||||
ExploitationOptionsConfiguration,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from common.configuration import AgentConfiguration, PluginConfiguration
|
||||
from common.agent_configuration import AgentConfiguration, PluginConfiguration
|
||||
from common.credentials import Credentials, Password, Username
|
||||
|
||||
from .noop import noop_test_configuration
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from common.configuration import AgentConfiguration, PluginConfiguration
|
||||
from common.agent_configuration import AgentConfiguration, PluginConfiguration
|
||||
|
||||
from .noop import noop_test_configuration
|
||||
from .utils import (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import abc
|
||||
from typing import Sequence
|
||||
|
||||
from common.configuration import AgentConfiguration
|
||||
from common.agent_configuration import AgentConfiguration
|
||||
from common.credentials import Credentials
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import threading
|
|||
import time
|
||||
from typing import Any, Callable, Iterable, List, Optional
|
||||
|
||||
from common.configuration import CustomPBAConfiguration, PluginConfiguration
|
||||
from common.agent_configuration import CustomPBAConfiguration, PluginConfiguration
|
||||
from common.utils import Timer
|
||||
from infection_monkey.credential_store import ICredentialsStore
|
||||
from infection_monkey.i_control_channel import IControlChannel, IslandCommunicationError
|
||||
|
|
|
@ -5,8 +5,8 @@ from typing import Mapping, Sequence
|
|||
|
||||
import requests
|
||||
|
||||
from common.agent_configuration import AgentConfiguration
|
||||
from common.common_consts.timeouts import SHORT_REQUEST_TIMEOUT
|
||||
from common.configuration import AgentConfiguration
|
||||
from common.credentials import Credentials
|
||||
from infection_monkey.i_control_channel import IControlChannel, IslandCommunicationError
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ from threading import Event
|
|||
from typing import Callable, Dict, Sequence
|
||||
|
||||
from common import OperatingSystems
|
||||
from common.configuration.agent_sub_configurations import (
|
||||
from common.agent_configuration.agent_sub_configurations import (
|
||||
ExploitationConfiguration,
|
||||
PluginConfiguration,
|
||||
)
|
||||
|
|
|
@ -5,7 +5,7 @@ from queue import Queue
|
|||
from threading import Event
|
||||
from typing import Callable, Dict, Sequence
|
||||
|
||||
from common.configuration.agent_sub_configurations import (
|
||||
from common.agent_configuration.agent_sub_configurations import (
|
||||
NetworkScanConfiguration,
|
||||
PluginConfiguration,
|
||||
ScanTargetConfiguration,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from common.configuration import CustomPBAConfiguration
|
||||
from common.agent_configuration import CustomPBAConfiguration
|
||||
from infection_monkey.utils.environment import is_windows_os
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ from queue import Queue
|
|||
from threading import Event
|
||||
from typing import List
|
||||
|
||||
from common.configuration import (
|
||||
from common.agent_configuration import (
|
||||
NetworkScanConfiguration,
|
||||
PropagationConfiguration,
|
||||
ScanTargetConfiguration,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import io
|
||||
|
||||
from common.configuration import AgentConfiguration
|
||||
from common.agent_configuration import AgentConfiguration
|
||||
from monkey_island.cc import repository
|
||||
from monkey_island.cc.repository import (
|
||||
IAgentConfigurationRepository,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from abc import ABC, abstractmethod
|
||||
|
||||
from common.configuration import AgentConfiguration
|
||||
from common.agent_configuration import AgentConfiguration
|
||||
|
||||
|
||||
class IAgentConfigurationRepository(ABC):
|
||||
|
|
|
@ -2,8 +2,10 @@ import json
|
|||
|
||||
from flask import make_response, request
|
||||
|
||||
from common.configuration.agent_configuration import AgentConfiguration as AgentConfigurationObject
|
||||
from common.configuration.agent_configuration import InvalidConfigurationError
|
||||
from common.agent_configuration.agent_configuration import (
|
||||
AgentConfiguration as AgentConfigurationObject,
|
||||
)
|
||||
from common.agent_configuration.agent_configuration import InvalidConfigurationError
|
||||
from monkey_island.cc.repository import IAgentConfigurationRepository
|
||||
from monkey_island.cc.resources.AbstractResource import AbstractResource
|
||||
from monkey_island.cc.resources.request_authentication import jwt_required
|
||||
|
|
|
@ -4,13 +4,13 @@ from pathlib import Path
|
|||
from pymongo import MongoClient
|
||||
|
||||
from common import DIContainer
|
||||
from common.aws import AWSInstance
|
||||
from common.common_consts.telem_categories import TelemCategoryEnum
|
||||
from common.configuration import (
|
||||
from common.agent_configuration import (
|
||||
DEFAULT_AGENT_CONFIGURATION,
|
||||
DEFAULT_RANSOMWARE_AGENT_CONFIGURATION,
|
||||
AgentConfiguration,
|
||||
)
|
||||
from common.aws import AWSInstance
|
||||
from common.common_consts.telem_categories import TelemCategoryEnum
|
||||
from common.utils.file_utils import get_binary_io_sha256_hash
|
||||
from monkey_island.cc.repository import (
|
||||
AgentBinaryRepository,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from common.configuration import AgentConfiguration
|
||||
from common.agent_configuration import AgentConfiguration
|
||||
from monkey_island.cc.models import IslandMode
|
||||
from monkey_island.cc.repository import IAgentConfigurationRepository, ISimulationRepository
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import logging
|
||||
|
||||
from common.agent_configuration import AgentConfiguration
|
||||
from common.common_consts.telem_categories import TelemCategoryEnum
|
||||
from common.configuration import AgentConfiguration
|
||||
from monkey_island.cc.models.telemetries import save_telemetry
|
||||
from monkey_island.cc.services.telemetry.processing.aws_info import process_aws_telemetry
|
||||
from monkey_island.cc.services.telemetry.processing.exploit import process_exploit_telemetry
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from typing import Mapping
|
||||
|
||||
from common.configuration import AgentConfiguration
|
||||
from common.agent_configuration import AgentConfiguration
|
||||
from monkey_island.cc.database import mongo
|
||||
from monkey_island.cc.models import Monkey
|
||||
from monkey_island.cc.services.node import NodeService
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import logging
|
||||
|
||||
from common.configuration import AgentConfiguration
|
||||
from common.agent_configuration import AgentConfiguration
|
||||
from monkey_island.cc.models import Monkey
|
||||
from monkey_island.cc.services.node import NodeService
|
||||
from monkey_island.cc.services.telemetry.zero_trust_checks.segmentation import (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import itertools
|
||||
|
||||
import common.common_consts.zero_trust_consts as zero_trust_consts
|
||||
from common.configuration import AgentConfiguration
|
||||
from common.agent_configuration import AgentConfiguration
|
||||
from common.network.network_range import NetworkRange
|
||||
from common.network.segmentation_utils import get_ip_if_in_subnet, get_ip_in_src_and_not_in_dst
|
||||
from monkey_island.cc.models import Monkey
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from common.configuration import DEFAULT_AGENT_CONFIGURATION
|
||||
from common.agent_configuration import DEFAULT_AGENT_CONFIGURATION
|
||||
from monkey_island.cc.repository import IAgentConfigurationRepository
|
||||
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@ from tests.common.example_agent_configuration import (
|
|||
WINDOWS_FILENAME,
|
||||
)
|
||||
|
||||
from common.configuration import AgentConfiguration, InvalidConfigurationError
|
||||
from common.configuration.agent_sub_configuration_schemas import (
|
||||
from common.agent_configuration import AgentConfiguration, InvalidConfigurationError
|
||||
from common.agent_configuration.agent_sub_configuration_schemas import (
|
||||
CustomPBAConfigurationSchema,
|
||||
ExploitationConfigurationSchema,
|
||||
ExploitationOptionsConfigurationSchema,
|
||||
|
@ -39,7 +39,7 @@ from common.configuration.agent_sub_configuration_schemas import (
|
|||
ScanTargetConfigurationSchema,
|
||||
TCPScanConfigurationSchema,
|
||||
)
|
||||
from common.configuration.agent_sub_configurations import (
|
||||
from common.agent_configuration.agent_sub_configurations import (
|
||||
CustomPBAConfiguration,
|
||||
ExploitationConfiguration,
|
||||
NetworkScanConfiguration,
|
||||
|
|
|
@ -7,7 +7,7 @@ from _pytest.monkeypatch import MonkeyPatch
|
|||
MONKEY_BASE_PATH = str(Path(__file__).parent.parent.parent)
|
||||
sys.path.insert(0, MONKEY_BASE_PATH)
|
||||
|
||||
from common.configuration import DEFAULT_AGENT_CONFIGURATION, AgentConfiguration # noqa: E402
|
||||
from common.agent_configuration import DEFAULT_AGENT_CONFIGURATION, AgentConfiguration # noqa: E402
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
|
|
|
@ -8,7 +8,7 @@ import pytest
|
|||
from tests.unit_tests.infection_monkey.master.mock_puppet import MockPuppet
|
||||
|
||||
from common import OperatingSystems
|
||||
from common.configuration.agent_sub_configurations import (
|
||||
from common.agent_configuration.agent_sub_configurations import (
|
||||
ExploitationConfiguration,
|
||||
PluginConfiguration,
|
||||
)
|
||||
|
|
|
@ -5,7 +5,7 @@ from unittest.mock import MagicMock
|
|||
import pytest
|
||||
from tests.unit_tests.infection_monkey.master.mock_puppet import MockPuppet
|
||||
|
||||
from common.configuration.agent_sub_configurations import (
|
||||
from common.agent_configuration.agent_sub_configurations import (
|
||||
ICMPScanConfiguration,
|
||||
NetworkScanConfiguration,
|
||||
PluginConfiguration,
|
||||
|
|
|
@ -3,7 +3,7 @@ from unittest.mock import MagicMock
|
|||
|
||||
import pytest
|
||||
|
||||
from common.configuration.agent_sub_configurations import (
|
||||
from common.agent_configuration.agent_sub_configurations import (
|
||||
NetworkScanConfiguration,
|
||||
PropagationConfiguration,
|
||||
ScanTargetConfiguration,
|
||||
|
|
|
@ -2,7 +2,7 @@ import pytest
|
|||
from tests.common.example_agent_configuration import AGENT_CONFIGURATION
|
||||
from tests.monkey_island import OpenErrorFileRepository, SingleFileRepository
|
||||
|
||||
from common.configuration import AgentConfiguration
|
||||
from common.agent_configuration import AgentConfiguration
|
||||
from monkey_island.cc.repository import FileAgentConfigurationRepository, RetrievalError
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ from tests.common.example_agent_configuration import AGENT_CONFIGURATION
|
|||
from tests.monkey_island import InMemoryAgentConfigurationRepository
|
||||
from tests.unit_tests.monkey_island.conftest import get_url_for_resource
|
||||
|
||||
from common.configuration import AgentConfiguration
|
||||
from common.agent_configuration import AgentConfiguration
|
||||
from monkey_island.cc.repository import IAgentConfigurationRepository
|
||||
from monkey_island.cc.resources.agent_configuration import (
|
||||
AgentConfiguration as AgentConfigurationResource,
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
import pytest
|
||||
from tests.monkey_island import InMemoryAgentConfigurationRepository, InMemorySimulationRepository
|
||||
|
||||
from common.configuration import DEFAULT_AGENT_CONFIGURATION, DEFAULT_RANSOMWARE_AGENT_CONFIGURATION
|
||||
from common.agent_configuration import (
|
||||
DEFAULT_AGENT_CONFIGURATION,
|
||||
DEFAULT_RANSOMWARE_AGENT_CONFIGURATION,
|
||||
)
|
||||
from monkey_island.cc.models import IslandMode
|
||||
from monkey_island.cc.services import IslandModeService
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ from unittest.mock import MagicMock
|
|||
import pytest
|
||||
from tests.monkey_island import InMemoryAgentConfigurationRepository
|
||||
|
||||
from common.configuration import AgentConfiguration
|
||||
from common.agent_configuration import AgentConfiguration
|
||||
from monkey_island.cc.repository import (
|
||||
IAgentConfigurationRepository,
|
||||
ICredentialsRepository,
|
||||
|
|
Loading…
Reference in New Issue