dissect.target.plugins.os.unix.locale

Module Contents

Classes

LocalePlugin

Unix locale plugin.

Functions

timezone_from_path

Return timezone name for the given zoneinfo path.

Attributes

dissect.target.plugins.os.unix.locale.UnixKeyboardRecord
dissect.target.plugins.os.unix.locale.timezone_from_path(path: pathlib.Path) str

Return timezone name for the given zoneinfo path.

/usr/share/zoneinfo/Europe/Amsterdam -> Europe/Amsterdam
/usr/share/zoneinfo/UTC              -> UTC
Etc/UTC                              -> UTC
class dissect.target.plugins.os.unix.locale.LocalePlugin(target: dissect.target.Target)

Bases: dissect.target.plugin.Plugin

Unix locale plugin.

check_compatible() None

Perform a compatibility check with the target.

This function should return None if the plugin is compatible with the current target (self.target). For example, check if a certain file exists. Otherwise it should raise an UnsupportedPluginError.

Raises:

UnsupportedPluginError – If the plugin could not be loaded.

timezone() str | None

Get the timezone of the system.

language() list[str]

Get the configured locale(s) of the system.

keyboard() Iterator[UnixKeyboardRecord]

Get the keyboard layout(s) of the system.