From d6e2994d6b5426273e7cc181bd01b6b0e12bc76d Mon Sep 17 00:00:00 2001 From: Archer Bowen Date: Tue, 13 Aug 2024 15:43:21 +0000 Subject: [PATCH] Apply suggestions from code review --- src/primaite/game/game.py | 2 +- .../system/applications/red_applications/c2/abstract_c2.py | 2 +- .../system/applications/red_applications/c2/c2_server.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index f4722514..d3035a5a 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -461,7 +461,7 @@ class PrimaiteGame: opt = application_cfg["options"] new_application.configure( c2_server_ip_address=IPv4Address(opt.get("c2_server_ip_address")), - keep_alive_frequency=(opt.get("keep_alive_frequency")) + keep_alive_frequency=(opt.get("keep_alive_frequency", 5)) if opt.get("keep_alive_frequency") else 5, masquerade_protocol=IPProtocol[(opt.get("masquerade_protocol"))] diff --git a/src/primaite/simulator/system/applications/red_applications/c2/abstract_c2.py b/src/primaite/simulator/system/applications/red_applications/c2/abstract_c2.py index fc383837..7fa8f9ad 100644 --- a/src/primaite/simulator/system/applications/red_applications/c2/abstract_c2.py +++ b/src/primaite/simulator/system/applications/red_applications/c2/abstract_c2.py @@ -187,7 +187,7 @@ class AbstractC2(Application, identifier="AbstractC2"): # Used in C2 server to parse and receive the output of commands sent to the c2 beacon. @abstractmethod def _handle_command_output(payload): - """Abstract Method: Used in C2 server to prase and receive the output of commands sent to the c2 beacon.""" + """Abstract Method: Used in C2 server to parse and receive the output of commands sent to the c2 beacon.""" pass # Abstract method diff --git a/src/primaite/simulator/system/applications/red_applications/c2/c2_server.py b/src/primaite/simulator/system/applications/red_applications/c2/c2_server.py index 3d71b881..f413a4b7 100644 --- a/src/primaite/simulator/system/applications/red_applications/c2/c2_server.py +++ b/src/primaite/simulator/system/applications/red_applications/c2/c2_server.py @@ -14,7 +14,7 @@ class C2Server(AbstractC2, identifier="C2Server"): """ C2 Server Application. - Represents a vendor generic C2 Server is used in conjunction with the C2 beacon + Represents a vendor generic C2 Server used in conjunction with the C2 beacon to simulate malicious communications and infrastructure within primAITE. The C2 Server must be installed and be in a running state before it's able to receive