mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-11 12:17:38 +02:00
Add additional typing information.
This commit is contained in:
@@ -96,7 +96,7 @@ class NlpDtbScanner(interfaces.layers.ScannerInterface):
|
||||
|
||||
def __call__(self, data: bytes, data_offset: int) \
|
||||
-> typing.Generator[typing.Tuple[int, typing.List[typing.Tuple[int, int]]], None, None]:
|
||||
structure = self._layer_class.structure
|
||||
structure = self._layer_class.structure # type: typing.List[typing.Tuple[str, int, bool]]
|
||||
name, size, large_page = structure[0]
|
||||
|
||||
# Somewhat hacky means of determining which format string to use
|
||||
|
||||
@@ -165,7 +165,7 @@ class KernelPDBScanner(interfaces.automagic.AutomagicInterface):
|
||||
if layer_name and virtual_layer_name:
|
||||
memlayer = context.memory[virtual_layer_name]
|
||||
if isinstance(memlayer, intel.Intel):
|
||||
page_size = memlayer.page_size
|
||||
page_size = memlayer.page_size # type: int
|
||||
results = {virtual_layer_name: scan(context,
|
||||
layer_name,
|
||||
page_size,
|
||||
|
||||
@@ -496,6 +496,7 @@ class _EPROCESS(generic.GenericIntelProcess, ExecutiveObject):
|
||||
raise TypeError("Parent layer is not a translation layer, unable to construct process layer")
|
||||
|
||||
# Presumably for 64-bit systems, the DTB is defined as an array, rather than an unsigned long long
|
||||
dtb = 0 # type: int
|
||||
if isinstance(self.Pcb.DirectoryTableBase, objects.Array):
|
||||
dtb = self.Pcb.DirectoryTableBase.cast("unsigned long long")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user