@@ -27,32 +27,33 @@ def load_plugin(self, plugin_type: AgentPluginType, plugin_name: str, plugin: ob
27
27
"""
28
28
Loads a plugin into the puppet
29
29
30
- :param AgentPluginType plugin_type: The type of plugin being loaded
31
- :param str plugin_name: The plugin class name
32
- :param object plugin: The plugin object to load
30
+ :param plugin_type: The type of plugin being loaded
31
+ :param plugin_name: The plugin class name
32
+ :param plugin: The plugin object to load
33
33
"""
34
34
35
35
@abc .abstractmethod
36
- def run_credentials_collector (self , name : str , options : Dict ) -> Sequence [Credentials ]:
36
+ def run_credentials_collector (
37
+ self , name : str , options : Dict , interrupt : Event
38
+ ) -> Sequence [Credentials ]:
37
39
"""
38
40
Runs a credentials collector
39
41
40
- :param str name: The name of the credentials collector to run
41
- :param Dict options: A dictionary containing options that modify the behavior of the
42
- Credentials collector
42
+ :param name: The name of the credentials collector to run
43
+ :param options: A dictionary containing options that modify the behavior of the
44
+ Credentials collector
45
+ :param interrupt: An event that can be used to interrupt the credentials collector
43
46
:return: A sequence of Credentials that have been collected from the system
44
- :rtype: Sequence[Credentials]
45
47
"""
46
48
47
49
@abc .abstractmethod
48
50
def ping (self , host : str , timeout : float ) -> PingScanData :
49
51
"""
50
52
Sends a ping (ICMP packet) to a remote host
51
53
52
- :param str host: The domain name or IP address of a host
53
- :param float timeout: The maximum amount of time (in seconds) to wait for a response
54
+ :param host: The domain name or IP address of a host
55
+ :param timeout: The maximum amount of time (in seconds) to wait for a response
54
56
:return: The data collected by attempting to ping the target host
55
- :rtype: PingScanData
56
57
"""
57
58
58
59
@abc .abstractmethod
@@ -84,8 +85,7 @@ def fingerprint(
84
85
:param name: The name of the fingerprinter to run
85
86
:param host: The domain name or IP address of a host
86
87
:param ping_scan_data: Data retrieved from the target host via ICMP
87
- :param port_scan_data: Data retrieved from the target host via a TCP
88
- port scan
88
+ :param port_scan_data: Data retrieved from the target host via a TCP port scan
89
89
:param options: A dictionary containing options that modify the behavior of the
90
90
fingerprinter
91
91
:return: Detailed information about the target host
@@ -104,29 +104,27 @@ def exploit_host(
104
104
"""
105
105
Runs an exploiter against a remote host
106
106
107
- :param str name: The name of the exploiter to run
108
- :param TargetHost host: A TargetHost object representing the target to exploit
109
- :param int current_depth: The current propagation depth
107
+ :param name: The name of the exploiter to run
108
+ :param host: A TargetHost object representing the target to exploit
109
+ :param current_depth: The current propagation depth
110
110
:param servers: List of socket addresses for victim to connect back to
111
- :param Dict options: A dictionary containing options that modify the behavior of the
112
- exploiter
113
- :param Event interrupt: An `Event` object that signals the exploit to stop
114
- executing and clean itself up.
111
+ :param options: A dictionary containing options that modify the behavior of the exploiter
112
+ :param interrupt: An `Event` object that signals the exploit to stop executing and clean
113
+ itself up.
115
114
:raises IncompatibleOperatingSystemError: If an exploiter is not compatible with the target
116
115
host's operating system
117
- :return: True if exploitation was successful, False otherwise
118
- :rtype: ExploiterResultData
116
+ :return: The result of the exploit attempt
119
117
"""
120
118
121
119
@abc .abstractmethod
122
120
def run_payload (self , name : str , options : Dict , interrupt : Event ):
123
121
"""
124
122
Runs a payload
125
123
126
- :param str name: The name of the payload to run
127
- :param Dict options: A dictionary containing options that modify the behavior of the payload
128
- :param Event interrupt: An `Event` object that signals the payload to stop
129
- executing and clean itself up.
124
+ :param name: The name of the payload to run
125
+ :param options: A dictionary containing options that modify the behavior of the payload
126
+ :param interrupt: An `Event` object that signals the payload to stop executing and clean
127
+ itself up.
130
128
"""
131
129
132
130
@abc .abstractmethod
0 commit comments