From 2402a51c609fd851702f4d4d8ffee456bdf5b7ec Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Thu, 7 Jan 2021 23:01:04 +0000 Subject: [PATCH] Symbols: Make the symbol shift optional The symbol_shift isn't quite as nice as it could be, because we use None to demark an unset state, which is different than a value of 0 (because unset will trip linux to try to identify, whereas 0 will not). Every where we use the value, we get it from the dictionary and use 0 if it's not found (essentially forcing a default), but ideally, the default would be set. As such, it's safe to set optional to true (and thus not require it for configuration files), but it's not ideal that the linux symbol finder can't determine whether to run or not without knowing whether the value's been intentionally set... --- volatility3/framework/interfaces/symbols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volatility3/framework/interfaces/symbols.py b/volatility3/framework/interfaces/symbols.py index 8f427d233..ba43b95a2 100644 --- a/volatility3/framework/interfaces/symbols.py +++ b/volatility3/framework/interfaces/symbols.py @@ -303,7 +303,7 @@ class SymbolTableInterface(BaseSymbolTableInterface, configuration.ConfigurableI @classmethod def get_requirements(cls) -> List[RequirementInterface]: return super().get_requirements() + [ - requirements.IntRequirement(name = 'symbol_shift', description = 'Symbol Shift', optional = False), + requirements.IntRequirement(name = 'symbol_shift', description = 'Symbol Shift', optional = True), requirements.IntRequirement( name = 'symbol_mask', description = 'Address mask for symbols', optional = True, default = 0), ]