forked from p15670423/monkey
Island: Register convention 'local_ip_addresses'
This commit is contained in:
parent
d189a94e9c
commit
1466fccc5f
|
@ -1,6 +1,7 @@
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from typing import Sequence
|
||||||
|
|
||||||
from pymongo import MongoClient
|
from pymongo import MongoClient
|
||||||
|
|
||||||
|
@ -14,6 +15,7 @@ from common.aws import AWSInstance
|
||||||
from common.common_consts.telem_categories import TelemCategoryEnum
|
from common.common_consts.telem_categories import TelemCategoryEnum
|
||||||
from common.utils.file_utils import get_binary_io_sha256_hash
|
from common.utils.file_utils import get_binary_io_sha256_hash
|
||||||
from common.version import get_version
|
from common.version import get_version
|
||||||
|
from monkey_island.cc.services.utils.network_utils import get_local_ip_addresses
|
||||||
from monkey_island.cc.deployment import Deployment
|
from monkey_island.cc.deployment import Deployment
|
||||||
from monkey_island.cc.repository import (
|
from monkey_island.cc.repository import (
|
||||||
AgentBinaryRepository,
|
AgentBinaryRepository,
|
||||||
|
@ -96,6 +98,7 @@ def _register_conventions(container: DIContainer, data_dir: Path):
|
||||||
)
|
)
|
||||||
container.register_convention(Path, "island_log_file_path", get_log_file_path(data_dir))
|
container.register_convention(Path, "island_log_file_path", get_log_file_path(data_dir))
|
||||||
container.register_convention(str, "version_number", get_version())
|
container.register_convention(str, "version_number", get_version())
|
||||||
|
container.register_convention(Sequence[str], "local_ip_addresses", get_local_ip_addresses())
|
||||||
|
|
||||||
|
|
||||||
def _register_repositories(container: DIContainer, data_dir: Path):
|
def _register_repositories(container: DIContainer, data_dir: Path):
|
||||||
|
|
Loading…
Reference in New Issue