pyplugins.hyper.canary module¶
Canary Plugin¶
This module implements a plugin for the Penguin hypervisor environment that listens for “canary” hypercalls. It is used to monitor and record the status of a canary value, typically for security or integrity checking.
Usage¶
The plugin is loaded by the Penguin framework and responds to “canary” events.
Example Output¶
If a canary status of 0 is received, the plugin writes a file named canary.txt containing 1 to the specified output directory.
canary.txt
-----------
1
Arguments¶
outdir: Output directory for the canary status file.verbose: If set, enables debug logging.
Classes¶
Canary: Main plugin class for handling canary status events.
- class pyplugins.hyper.canary.Canary[source]¶
Bases:
PluginCanary is a plugin that listens for “canary” hypercalls and writes a status file.
Arguments: - outdir (str): Output directory for the canary status file. - verbose (bool): Enables debug logging if True.
- cmd_canary(status)[source]¶
Handle a canary status event and write the status to a file if appropriate.
Parameters: - status (int): The canary status value received.
Returns: - (int, str): Tuple containing status code (0 for success) and an empty string.
- Parameters:
status (int)
- Return type:
tuple[int, str]