From ae9d7dbc864a5642757973457d818c1961ede962 Mon Sep 17 00:00:00 2001 From: Michael Ligh Date: Mon, 11 Jun 2018 21:23:16 -0500 Subject: [PATCH] use *args and **kwargs when inheriting from IntermediateSymbolTable --- volatility/framework/symbols/windows/kdbg.py | 12 ++---------- volatility/framework/symbols/windows/pe.py | 9 ++------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/volatility/framework/symbols/windows/kdbg.py b/volatility/framework/symbols/windows/kdbg.py index afe51ecf7..4ce49b2c8 100644 --- a/volatility/framework/symbols/windows/kdbg.py +++ b/volatility/framework/symbols/windows/kdbg.py @@ -6,15 +6,7 @@ from volatility.framework.symbols.windows.extensions import kdbg class KdbgIntermedSymbols(intermed.IntermediateSymbolTable): - def __init__(self, - context: interfaces.context.ContextInterface, - config_path: str, - name: str, - isf_url: str, - table_mapping: typing.Optional[typing.Dict[str, str]] = None) -> None: - super().__init__(context = context, config_path = config_path, name = name, isf_url = isf_url, table_mapping = table_mapping) - - if table_mapping is None or "nt_symbols" not in table_mapping: - raise exceptions.SymbolSpaceError("KdbgIntermedSymbols must be passed a table_mapping with nt_symbols") + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) self.set_type_class('_KDDEBUGGER_DATA64', kdbg._KDDEBUGGER_DATA64) \ No newline at end of file diff --git a/volatility/framework/symbols/windows/pe.py b/volatility/framework/symbols/windows/pe.py index 61d143a74..78c2ba0d3 100644 --- a/volatility/framework/symbols/windows/pe.py +++ b/volatility/framework/symbols/windows/pe.py @@ -7,13 +7,8 @@ from volatility.framework.symbols.windows.extensions import pe class PEIntermedSymbols(intermed.IntermediateSymbolTable): - def __init__(self, - context: interfaces.context.ContextInterface, - config_path: str, - name: str, - isf_url: str, - table_mapping: typing.Optional[typing.Dict[str, str]] = None) -> None: - super().__init__(context = context, config_path = config_path, name = name, isf_url = isf_url, table_mapping = table_mapping) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) self.set_type_class('_IMAGE_DOS_HEADER', pe._IMAGE_DOS_HEADER) # the 32- and 64-bit extensions behave the same way, but the underlying structure is different