:py:mod:`dissect.target.plugins.apps.vpn.openvpn` ================================================= .. py:module:: dissect.target.plugins.apps.vpn.openvpn Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.target.plugins.apps.vpn.openvpn.OpenVPNParser dissect.target.plugins.apps.vpn.openvpn.OpenVPNPlugin Attributes ~~~~~~~~~~ .. autoapisummary:: dissect.target.plugins.apps.vpn.openvpn.COMMON_ELEMENTS dissect.target.plugins.apps.vpn.openvpn.OpenVPNServer dissect.target.plugins.apps.vpn.openvpn.OpenVPNClient .. py:data:: COMMON_ELEMENTS :value: [('string', 'name'), ('string', 'proto'), ('string', 'dev'), ('string', 'ca'), ('string',... .. py:data:: OpenVPNServer .. py:data:: OpenVPNClient .. py:class:: OpenVPNParser(*args, **kwargs) Bases: :py:obj:`dissect.target.helpers.configutil.Default` Parse a configuration file specified by ``separator`` and ``comment_prefixes``. This parser splits only on the first ``separator`` it finds: keyvalue -> {"key": "value"} keyvalue continuation -> {"key": "value continuation"} # Unless we collapse values, we add them to a list to not overwrite any values. keyvalue1 keyvalue2 -> {key: [value1, value2]} -> skip .. py:method:: parse_file(fh: io.TextIOBase) -> None Parse the contents of ``fh`` into key/value pairs. This function should **set** :attr:`parsed_data` as a side_effect. :param fh: The text to parse. .. py:class:: OpenVPNPlugin(target) Bases: :py:obj:`dissect.target.plugin.Plugin` OpenVPN configuration parser. .. rubric:: References - man (8) openvpn .. py:attribute:: __namespace__ :value: 'openvpn' .. py:attribute:: config_globs :value: ['/etc/openvpn/', 'sysvol/Program Files/OpenVPN/config/'] .. py:attribute:: user_config_paths .. py:method:: 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. .. py:method:: config(export_key: bool = False) -> Iterator[Union[OpenVPNServer, OpenVPNClient]] Parses config files from openvpn interfaces.