TuoniListenerPlugin¶
- class tuoni.TuoniListenerPlugin(conf, c2)[source]¶
A class that provides data and functionality for a listener plugin.
- name¶
The name of the listener plugin.
- Type:
str
- vendor¶
The vendor of the listener plugin.
- Type:
str
- description¶
A description of the listener plugin.
- Type:
str
- plugin_id¶
The unique identifier of the listener plugin.
- Type:
str
- conf_schema¶
The configuration schema for the listener plugin.
- Type:
dict
- conf_examples¶
Examples of valid configurations for the listener plugin.
- Type:
dict
- create(new_listener_conf, new_listener_name=None)[source]¶
Create a new listener.
- Parameters:
new_listener_conf (dict) – The configuration for the new listener.
new_listener_name (str) – The name to assign to the new listener.
- Returns:
An object representing the newly created listener.
- Return type:
Examples
>>> http_listener_plugin = tuoni_server.load_listener_plugins()["shelldot.listener.agent-reverse-http"] >>> conf = http_listener_plugin.conf_examples["default"] >>> conf["sleep"] = 2 >>> conf["instantResponses"] = True >>> listener = http_listener_plugin.create(conf)