Keep the advanced configuration requirements out of the interfaces

This commit is contained in:
Mike Auty
2025-02-02 16:18:42 +00:00
parent 144a7cc3f5
commit fbb9627d36
3 changed files with 6 additions and 12 deletions
@@ -641,7 +641,10 @@ class ModuleRequirement(
@classmethod
def get_requirements(cls) -> List[interfaces.configuration.RequirementInterface]:
return interfaces.context.ModuleInterface.get_requirements()
return [
IntRequirement(name="offset"),
SymbolTableRequirement(name="symbol_table_name"),
]
def unsatisfied(
self, context: "interfaces.context.ContextInterface", config_path: str
@@ -158,14 +158,6 @@ class ModuleInterface(interfaces.configuration.ConfigurableInterface):
super().__init__(context, config_path)
self._module_name = name
@classmethod
def get_requirements(cls) -> List[interfaces.configuration.RequirementInterface]:
# Can't include the translation layer without knowing the architectures
return [
SymbolTableRequirement(name="symbol_table_name"),
IntRequirement(name="offset"),
]
@property
def _layer_name(self) -> str:
return self.config["layer_name"]
@@ -89,9 +89,8 @@ class SSDT(plugins.PluginInterface):
self.context, layer_name, kernel.symbol_table_name
)
ntkrnlmp = self.context.module(
kernel.symbol_table_name, layer_name=kernel.offset, offset=kvo
)
ntkrnlmp = kernel
kvo = kernel.offset
# this is just one way to enumerate the native (NT) service table.
# to do the same thing for the Win32K service table, we would need Win32K.sys symbol support