From bd31cfd9470f29cfc01c162ba96759ef2939aba1 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Mon, 22 Nov 2021 18:23:37 +0530 Subject: [PATCH] Agent: Add IMaster --- monkey/infection_monkey/i_master.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 monkey/infection_monkey/i_master.py diff --git a/monkey/infection_monkey/i_master.py b/monkey/infection_monkey/i_master.py new file mode 100644 index 000000000..b045941df --- /dev/null +++ b/monkey/infection_monkey/i_master.py @@ -0,0 +1,27 @@ +import abc + + +class IMaster(metaclass=abc.ABCMeta): + @abc.abstractmethod + def start(self) -> None: + """ + With the help of the puppet, starts and instructs the Agent to + perform various actions like scanning or exploiting a specific host. + """ + pass + + @abc.abstractmethod + def terminate(self) -> None: + """ + Effectively marks the Agent as dead, telling all actions being + performed by the Agent to stop. + """ + pass + + @abc.abstractmethod + def cleanup(self) -> None: + """ + With the help of the puppet, instructs the Agent to cleanup whatever + is required since the Agent was killed. + """ + pass