forked from p15670423/monkey
Island: Move network_utils from services/ -> server_utils/
This commit is contained in:
parent
285e6aaa35
commit
ad3dd6ba36
|
@ -19,7 +19,7 @@ from mongoengine import (
|
||||||
from monkey_island.cc.models.command_control_channel import CommandControlChannel
|
from monkey_island.cc.models.command_control_channel import CommandControlChannel
|
||||||
from monkey_island.cc.models.monkey_ttl import MonkeyTtl, create_monkey_ttl_document
|
from monkey_island.cc.models.monkey_ttl import MonkeyTtl, create_monkey_ttl_document
|
||||||
from monkey_island.cc.server_utils.consts import DEFAULT_MONKEY_TTL_EXPIRY_DURATION_IN_SECONDS
|
from monkey_island.cc.server_utils.consts import DEFAULT_MONKEY_TTL_EXPIRY_DURATION_IN_SECONDS
|
||||||
from monkey_island.cc.services.utils.network_utils import get_ip_addresses
|
from monkey_island.cc.server_utils.network_utils import get_ip_addresses
|
||||||
|
|
||||||
|
|
||||||
class ParentNotFoundError(Exception):
|
class ParentNotFoundError(Exception):
|
||||||
|
|
|
@ -33,8 +33,8 @@ from monkey_island.cc.server_utils.consts import ( # noqa: E402
|
||||||
MONKEY_ISLAND_ABS_PATH,
|
MONKEY_ISLAND_ABS_PATH,
|
||||||
)
|
)
|
||||||
from monkey_island.cc.server_utils.island_logger import reset_logger, setup_logging # noqa: E402
|
from monkey_island.cc.server_utils.island_logger import reset_logger, setup_logging # noqa: E402
|
||||||
|
from monkey_island.cc.server_utils.network_utils import get_ip_addresses # noqa: E402
|
||||||
from monkey_island.cc.services.initialize import initialize_services # noqa: E402
|
from monkey_island.cc.services.initialize import initialize_services # noqa: E402
|
||||||
from monkey_island.cc.services.utils.network_utils import get_ip_addresses # noqa: E402
|
|
||||||
from monkey_island.cc.setup import PyWSGILoggingFilter # noqa: E402
|
from monkey_island.cc.setup import PyWSGILoggingFilter # noqa: E402
|
||||||
from monkey_island.cc.setup import island_config_options_validator # noqa: E402
|
from monkey_island.cc.setup import island_config_options_validator # noqa: E402
|
||||||
from monkey_island.cc.setup.data_dir import IncompatibleDataDirectory, setup_data_dir # noqa: E402
|
from monkey_island.cc.setup.data_dir import IncompatibleDataDirectory, setup_data_dir # noqa: E402
|
||||||
|
|
|
@ -4,6 +4,8 @@ from typing import Sequence
|
||||||
from netifaces import AF_INET, ifaddresses, interfaces
|
from netifaces import AF_INET, ifaddresses, interfaces
|
||||||
from ring import lru
|
from ring import lru
|
||||||
|
|
||||||
|
# TODO: This functionality is duplicated in the agent. Unify them after 2216-tcp-relay is merged
|
||||||
|
|
||||||
|
|
||||||
# The local IP addresses list should not change often. Therefore, we can cache the result and never
|
# The local IP addresses list should not change often. Therefore, we can cache the result and never
|
||||||
# call this function more than once. This stopgap measure is here since this function is called a
|
# call this function more than once. This stopgap measure is here since this function is called a
|
|
@ -7,9 +7,9 @@ import monkey_island.cc.services.log
|
||||||
from monkey_island.cc import models
|
from monkey_island.cc import models
|
||||||
from monkey_island.cc.database import mongo
|
from monkey_island.cc.database import mongo
|
||||||
from monkey_island.cc.models import Monkey
|
from monkey_island.cc.models import Monkey
|
||||||
|
from monkey_island.cc.server_utils.network_utils import get_ip_addresses
|
||||||
from monkey_island.cc.services.edge.displayed_edge import DisplayedEdgeService
|
from monkey_island.cc.services.edge.displayed_edge import DisplayedEdgeService
|
||||||
from monkey_island.cc.services.edge.edge import EdgeService
|
from monkey_island.cc.services.edge.edge import EdgeService
|
||||||
from monkey_island.cc.services.utils.network_utils import get_ip_addresses
|
|
||||||
from monkey_island.cc.services.utils.node_states import NodeStates
|
from monkey_island.cc.services.utils.node_states import NodeStates
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ from monkey_island.cc.database import mongo
|
||||||
from monkey_island.cc.models import Monkey
|
from monkey_island.cc.models import Monkey
|
||||||
from monkey_island.cc.models.report import get_report, save_report
|
from monkey_island.cc.models.report import get_report, save_report
|
||||||
from monkey_island.cc.repository import IAgentConfigurationRepository, ICredentialsRepository
|
from monkey_island.cc.repository import IAgentConfigurationRepository, ICredentialsRepository
|
||||||
|
from monkey_island.cc.server_utils.network_utils import get_ip_addresses, get_subnets
|
||||||
from monkey_island.cc.services.node import NodeService
|
from monkey_island.cc.services.node import NodeService
|
||||||
from monkey_island.cc.services.reporting.exploitations.manual_exploitation import get_manual_monkeys
|
from monkey_island.cc.services.reporting.exploitations.manual_exploitation import get_manual_monkeys
|
||||||
from monkey_island.cc.services.reporting.exploitations.monkey_exploitation import (
|
from monkey_island.cc.services.reporting.exploitations.monkey_exploitation import (
|
||||||
|
@ -19,7 +20,6 @@ from monkey_island.cc.services.reporting.pth_report import PTHReportService
|
||||||
from monkey_island.cc.services.reporting.report_generation_synchronisation import (
|
from monkey_island.cc.services.reporting.report_generation_synchronisation import (
|
||||||
safe_generate_regular_report,
|
safe_generate_regular_report,
|
||||||
)
|
)
|
||||||
from monkey_island.cc.services.utils.network_utils import get_ip_addresses, get_subnets
|
|
||||||
|
|
||||||
from .. import AWSService
|
from .. import AWSService
|
||||||
from . import aws_exporter
|
from . import aws_exporter
|
||||||
|
|
Loading…
Reference in New Issue