Refactor SymbolRequirement to SymbolTableRequirement for clarity.

This commit is contained in:
Mike Auty
2019-02-06 21:26:32 +00:00
parent d23e6474ce
commit f898dca296
44 changed files with 67 additions and 93 deletions
+3 -7
View File
@@ -40,7 +40,7 @@ class Lsmod(plugins.PluginInterface):
return [
requirements.TranslationLayerRequirement(
name = 'primary', description = 'Memory layer for the kernel', architectures = ["Intel32", "Intel64"]),
requirements.SymbolRequirement(name = "vmlinux", description = "Linux kernel symbols")
requirements.SymbolTableRequirement(name = "vmlinux", description = "Linux kernel symbols")
]
@classmethod
@@ -48,12 +48,8 @@ class Lsmod(plugins.PluginInterface):
"""Lists all the modules in the primary layer"""
linux.LinuxUtilities.aslr_mask_symbol_table(context, vmlinux_symbols, layer_name)
vmlinux = contexts.Module(context,
vmlinux_symbols,
layer_name,
0,
absolute_symbol_addresses = True)
vmlinux = contexts.Module(context, vmlinux_symbols, layer_name, 0, absolute_symbol_addresses = True)
modules = vmlinux.object(symbol_name = "modules").cast("list_head")
table_name = modules.vol.type_name.split(constants.BANG)[0]