:py:mod:`dissect.target.plugins.os.windows.env` =============================================== .. py:module:: dissect.target.plugins.os.windows.env Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.target.plugins.os.windows.env.EnvironmentVariablePlugin Attributes ~~~~~~~~~~ .. autoapisummary:: dissect.target.plugins.os.windows.env.EnvironmentRecord dissect.target.plugins.os.windows.env.PathextRecord dissect.target.plugins.os.windows.env.EnvVarDetails .. py:data:: EnvironmentRecord .. py:data:: PathextRecord .. py:data:: EnvVarDetails .. py:class:: EnvironmentVariablePlugin(target: dissect.target.Target) Bases: :py:obj:`dissect.target.plugin.Plugin` Plugin that provides access to global environment variables. Mostly used internally. .. py:property:: env :type: collections.OrderedDict[str, str] Return a dict of all found system environment variables. .. py:property:: pathext :type: Set[str] Return a list of all found path extensions. .. py:attribute:: VARIABLES .. py:attribute:: USER_VARIABLES .. 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:: expand_env(path: str, user_sid: Optional[str] = None) -> str .. py:method:: user_env(user_sid: Optional[str] = None) -> collections.OrderedDict[str, str] Return a dict of all found (user) environment variables. If no ``user_sid` is provided, this function will return just the system environment variables. .. py:method:: environment_variables() -> Iterator[EnvironmentRecord] Return all environment variables on a Windows system. Environment variables are dynamic-named values that can affect the way processes are running on the system. Examples variables are PATH, HOME and TEMP. Adversaries may alter or create environment variables to exploit a system. .. rubric:: References - https://en.wikipedia.org/wiki/Environment_variable - https://www.elttam.com/blog/env/ .. py:method:: path_extensions() -> Iterator[PathextRecord] Return all found path extensions.