forked from p15670423/monkey
Island: Add AWSInstance to the DIContainer
This commit is contained in:
parent
4f023621d4
commit
e83848c8a4
|
@ -2,6 +2,7 @@ from pathlib import Path
|
|||
from threading import Thread
|
||||
|
||||
from common import DIContainer
|
||||
from common.aws import AWSInstance
|
||||
from monkey_island.cc.services import DirectoryFileStorageService, IFileStorageService, aws_service
|
||||
from monkey_island.cc.services.post_breach_files import PostBreachFilesService
|
||||
from monkey_island.cc.services.run_local_monkey import LocalMonkeyRunService
|
||||
|
@ -14,6 +15,7 @@ def initialize_services(data_dir: Path) -> DIContainer:
|
|||
container.register_instance(
|
||||
IFileStorageService, DirectoryFileStorageService(data_dir / "custom_pbas")
|
||||
)
|
||||
container.register_instance(AWSInstance, AWSInstance())
|
||||
|
||||
# Takes a while so it's best to start it in the background
|
||||
Thread(target=aws_service.initialize, name="AwsService initialization", daemon=True).start()
|
||||
|
|
Loading…
Reference in New Issue