mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-10 03:37:39 +02:00
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...
This commit is contained in:
@@ -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),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user