From 560d941885c9a30b10cae3f12d4b20eb7eeb629f Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Thu, 22 Sep 2022 12:00:20 +0200 Subject: [PATCH] Island: Add terminate field to Simulation model --- monkey/monkey_island/cc/models/simulation.py | 3 +++ vulture_allowlist.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/models/simulation.py b/monkey/monkey_island/cc/models/simulation.py index d04bee76b..3f52ae370 100644 --- a/monkey/monkey_island/cc/models/simulation.py +++ b/monkey/monkey_island/cc/models/simulation.py @@ -1,6 +1,8 @@ from __future__ import annotations +from datetime import datetime from enum import Enum +from typing import Optional from common.base_models import InfectionMonkeyBaseModel @@ -13,3 +15,4 @@ class IslandMode(Enum): class Simulation(InfectionMonkeyBaseModel): mode: IslandMode = IslandMode.UNSET + terminate_signal_time: Optional[datetime] = None diff --git a/vulture_allowlist.py b/vulture_allowlist.py index ef9613fca..43292e49e 100644 --- a/vulture_allowlist.py +++ b/vulture_allowlist.py @@ -11,7 +11,7 @@ from common.credentials import Credentials, LMHash, NTHash from common.types import SocketAddress from infection_monkey.exploit.log4shell_utils.ldap_server import LDAPServerFactory from monkey_island.cc.event_queue import IslandEventTopic, PyPubSubIslandEventQueue -from monkey_island.cc.models import Report +from monkey_island.cc.models import Report, Simulation from monkey_island.cc.models.networkmap import Arc, NetworkMap from monkey_island.cc.repository import MongoAgentRepository, MongoMachineRepository from monkey_island.cc.repository.attack.IMitigationsRepository import IMitigationsRepository @@ -328,3 +328,5 @@ CC_TUNNEL # TODO: Remove after #2323 SocketAddress + +Simulation.terminate_signal_time