From 54db99350d0f2f9f188b7c5f8fbd87ed2c8a3bdd Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 18 Aug 2022 09:14:59 -0400 Subject: [PATCH] Island: Add CommunicationType Enum --- monkey/monkey_island/cc/models/__init__.py | 1 + .../monkey_island/cc/models/communication_type.py | 15 +++++++++++++++ vulture_allowlist.py | 7 +++++++ 3 files changed, 23 insertions(+) create mode 100644 monkey/monkey_island/cc/models/communication_type.py diff --git a/monkey/monkey_island/cc/models/__init__.py b/monkey/monkey_island/cc/models/__init__.py index 319b7b34f..801da2932 100644 --- a/monkey/monkey_island/cc/models/__init__.py +++ b/monkey/monkey_island/cc/models/__init__.py @@ -10,3 +10,4 @@ from monkey_island.cc.models.report.report import Report from .simulation import Simulation, SimulationSchema, IslandMode from .user_credentials import UserCredentials from .machine import Machine +from .communication_type import CommunicationType diff --git a/monkey/monkey_island/cc/models/communication_type.py b/monkey/monkey_island/cc/models/communication_type.py new file mode 100644 index 000000000..0991dd5de --- /dev/null +++ b/monkey/monkey_island/cc/models/communication_type.py @@ -0,0 +1,15 @@ +from enum import Enum + + +class CommunicationType(Enum): + """ + An Enum representing different types of communication between agents and the Island + + This Enum represents the different was agents can communicate with each other and with the + Island. The value of each member is the member's name in all lower-case characters. + """ + + SCANNED = "scanned" + EXPLOITED = "exploited" + CC = "cc" + CC_TUNNEL = "cc_tunnel" diff --git a/vulture_allowlist.py b/vulture_allowlist.py index 29cedf4c0..71b0e2ece 100644 --- a/vulture_allowlist.py +++ b/vulture_allowlist.py @@ -282,3 +282,10 @@ underscore_attrs_are_private extra allow_mutation validate_assignment + +# CommunicationType +CommunicationType +SCANNED +EXPLOITED +CC +CC_TUNNEL