dissect.target.plugins.os.unix.etc.etc¶
Module Contents¶
Classes¶
Unix etc configuration tree plugin. |
Attributes¶
- dissect.target.plugins.os.unix.etc.etc.UnixConfigTreeRecord¶
- class dissect.target.plugins.os.unix.etc.etc.EtcTree(target: dissect.target.target.Target)¶
Bases:
dissect.target.plugin.PluginUnix etc configuration tree plugin.
- __namespace__ = 'etc'¶
Defines the plugin namespace.
- check_compatible() None¶
Perform a compatibility check with the target.
This function should return
Noneif the plugin is compatible with the current target (self.target). For example, check if a certain file exists. Otherwise it should raise anUnsupportedPluginError.- Raises:
UnsupportedPluginError – If the plugin could not be loaded.
- etc(pattern: str, root: str, unknowns: bool) collections.abc.Iterator[UnixConfigTreeRecord]¶
This plugin yields configuration information from the etc directory in key value pairs.
- Parameters:
pattern – What glob-style pattern to search for.
root – Path to use as root for searching.
unknowns – Whether to also yield entries for unknown entries.
Yields UnixConfigTreeRecord with the following fields:
source (path): The path on the target used for parsing. path (path): The path inside the configuration file that is being used. key (string): The configuration key returned by parsing. value (string[]): The configuration value belonging to the key.