dissect.target.plugins.apps.vpn.wireguard

Module Contents

Classes

WireGuardPlugin

WireGuard configuration parser.

MultiDict

OrderedDict implementation which allows multiple values for the keys Peer and Interface.

Attributes

dissect.target.plugins.apps.vpn.wireguard.WireGuardInterfaceRecord
dissect.target.plugins.apps.vpn.wireguard.WireGuardPeerRecord
class dissect.target.plugins.apps.vpn.wireguard.WireGuardPlugin(target)

Bases: dissect.target.plugin.Plugin

WireGuard configuration parser.

References

__namespace__ = 'wireguard'

Defines the plugin namespace.

CONFIG_GLOBS = ['/etc/wireguard/*.conf', '/usr/local/etc/wireguard/*.conf',...
TUNNEL_NAME_RE
configs: list[pathlib.Path] = []
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.

config() Iterator[WireGuardInterfaceRecord | WireGuardPeerRecord]

Parses interface config files from wireguard installations.

class dissect.target.plugins.apps.vpn.wireguard.MultiDict(*args, **kwargs)

Bases: collections.OrderedDict

OrderedDict implementation which allows multiple values for the keys Peer and Interface.

__setitem__(key, val)

Set self[key] to value.