mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-27 03:54:49 +02:00
Fix up more typing discrepancies.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user