mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-26 16:12:23 +02:00
Fix up the broken vtypes conversion by translating between the names.
This commit is contained in:
@@ -67,7 +67,7 @@ class VTypeSymbolTable(interfaces.symbols.SymbolTableInterface):
|
||||
if not dictionary:
|
||||
raise exceptions.SymbolSpaceError("Invalid vtype dictionary: " + repr(dictionary))
|
||||
|
||||
type_name = dictionary[0]
|
||||
type_name = self._translate_vtype_to_intermed(dictionary[0])
|
||||
|
||||
if type_name in self.natives.types:
|
||||
# The symbol is a native type
|
||||
@@ -95,6 +95,14 @@ class VTypeSymbolTable(interfaces.symbols.SymbolTableInterface):
|
||||
|
||||
return objects.templates.ReferenceTemplate(type_name = self.name + constants.BANG + type_name)
|
||||
|
||||
def _translate_vtype_to_intermed(self, name):
|
||||
"""Allows backwards compatibility by converting vtype identifiers to intermediate format identifiers"""
|
||||
if name == 'Enumeration':
|
||||
return 'enum'
|
||||
elif name in ['BitField', 'String', 'Bytes']:
|
||||
return name.lower()
|
||||
return name
|
||||
|
||||
@property
|
||||
def types(self):
|
||||
"""Returns an iterator of the symbol names"""
|
||||
|
||||
Reference in New Issue
Block a user