diff --git a/volatility/framework/interfaces/context.py b/volatility/framework/interfaces/context.py index e9177f054..e83cac00f 100644 --- a/volatility/framework/interfaces/context.py +++ b/volatility/framework/interfaces/context.py @@ -153,7 +153,7 @@ class ModuleInterface(metaclass = ABCMeta): def get_symbol(self, name: str) -> 'interfaces.symbols.SymbolInterface': """Returns a symbol from the module""" - def get_enumeration(self, name: str) -> 'interfaces.object.Template': + def get_enumeration(self, name: str) -> 'interfaces.objects.Template': """Returns an enumeration from the module""" def has_type(self, name: str) -> bool: diff --git a/volatility/framework/interfaces/symbols.py b/volatility/framework/interfaces/symbols.py index 0671c133d..7d2100339 100644 --- a/volatility/framework/interfaces/symbols.py +++ b/volatility/framework/interfaces/symbols.py @@ -268,7 +268,7 @@ class SymbolTableInterface(BaseSymbolTableInterface, configuration.ConfigurableI class NativeTableInterface(BaseSymbolTableInterface): """Class to distinguish NativeSymbolLists from other symbol lists""" - def get_symbol(self, name: str) -> objects.Template: + def get_symbol(self, name: str) -> SymbolInterface: raise exceptions.SymbolError("NativeTables never hold symbols") @property diff --git a/volatility/framework/plugins/windows/registry/userassist.py b/volatility/framework/plugins/windows/registry/userassist.py index e4c287fe5..06c510892 100644 --- a/volatility/framework/plugins/windows/registry/userassist.py +++ b/volatility/framework/plugins/windows/registry/userassist.py @@ -23,7 +23,7 @@ import datetime import json import logging import os -from typing import Any, List, Tuple +from typing import Any, List, Tuple, Generator from volatility.framework import exceptions, renderers, constants, interfaces from volatility.framework.configuration import requirements @@ -127,7 +127,7 @@ class UserAssist(interfaces.plugins.PluginInterface): return self.context.symbol_space.get_type(self.config['nt_symbols'] + constants.BANG + "_KUSER_SHARED_DATA").has_member('CookiePad') - def list_userassist(self, hive: RegistryHive): + def list_userassist(self, hive: RegistryHive) -> Generator[Tuple[int, Tuple], None, None]: """Generate userassist data for a registry hive.""" hive_name = hive.hive.cast(self.config["nt_symbols"] + constants.BANG + "_CMHIVE").get_name() @@ -148,6 +148,9 @@ class UserAssist(interfaces.plugins.PluginInterface): vollog.warning("list_userassist did not find a valid node_path (or None)") return + if not isinstance(userassist_node_path, list): + vollog.warning("userassist_node_path did not return a list as expected") + return userassist_node = userassist_node_path[-1] # iterate through the GUIDs under the userassist key for guidkey in userassist_node.get_subkeys():