mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-26 16:12:23 +02:00
Refactor Module in interfaces to ModuleInterface.
This commit is contained in:
@@ -104,7 +104,7 @@ class Context(interfaces.context.ContextInterface):
|
||||
def module(self, # type: ignore # FIXME: mypy #5107
|
||||
module_name: str,
|
||||
layer_name: str,
|
||||
offset: int) -> interfaces.context.Module:
|
||||
offset: int) -> interfaces.context.ModuleInterface:
|
||||
"""Creates a module object"""
|
||||
return Module(self, module_name, layer_name, offset)
|
||||
|
||||
@@ -121,7 +121,7 @@ def get_module_wrapper(method: str) -> typing.Callable:
|
||||
return wrapper
|
||||
|
||||
|
||||
class Module(interfaces.context.Module):
|
||||
class Module(interfaces.context.ModuleInterface):
|
||||
def object(self,
|
||||
symbol_name: typing.Optional[str] = None,
|
||||
type_name: typing.Optional[str] = None,
|
||||
|
||||
@@ -79,11 +79,11 @@ class ContextInterface(object, metaclass = ABCMeta):
|
||||
def module(self,
|
||||
module_name: str,
|
||||
layer_name: str,
|
||||
offset: int) -> 'Module':
|
||||
offset: int) -> 'ModuleInterface':
|
||||
"""Create a module object """
|
||||
|
||||
|
||||
class Module(validity.ValidityRoutines, metaclass = ABCMeta):
|
||||
class ModuleInterface(validity.ValidityRoutines, metaclass = ABCMeta):
|
||||
"""Maintains state concerning a particular loaded module in memory
|
||||
|
||||
This object is OS-independent.
|
||||
|
||||
@@ -88,7 +88,7 @@ class VerInfo(interfaces_plugins.PluginInterface):
|
||||
|
||||
def _generator(self,
|
||||
procs: typing.Generator[interfaces.objects.ObjectInterface, None, None],
|
||||
mods: typing.Generator[interfaces.context.Module, None, None],
|
||||
mods: typing.Generator[interfaces.context.ModuleInterface, None, None],
|
||||
moddump_plugin: moddump.ModDump):
|
||||
"""Generates a list of PE file version info for processes, dlls, and modules.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user