Agent: Add IPayload interface

This commit is contained in:
Mike Salvatore 2021-12-17 08:12:37 -05:00
parent 8e0efb1993
commit 3adb1d5b07
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
import abc
import threading
from typing import Dict
class IPayload(metaclass=abc.ABCMeta):
@abc.abstractmethod
def run(self, options: Dict, interrupt: threading.Event):
"""
Runs the payload
:param Dict options: A dictionary containing options that modify the behavior of the payload
:param threading.Event interrupt: A threading.Event object that signals the payload to stop
executing and clean itself up.
"""