mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-10 11:47:38 +02:00
Update check_modules.py
Removed unnecessary header info. A symbol table without the module_kset struct will now raise a TypeError
This commit is contained in:
@@ -1,14 +1,7 @@
|
||||
# Volatility
|
||||
|
||||
# This file is Copyright 2020 Volatility Foundation and licensed under the Volatility Software License 1.0
|
||||
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
|
||||
#
|
||||
|
||||
"""
|
||||
@author: Matt Tressler
|
||||
@contact: matthewtressler10@gmail.com
|
||||
"""
|
||||
|
||||
import logging
|
||||
from typing import List
|
||||
|
||||
@@ -45,11 +38,10 @@ class check_modules(plugins.PluginInterface):
|
||||
try:
|
||||
module_kset = vmlinux.object_from_symbol("module_kset")
|
||||
except exceptions.SymbolError:
|
||||
vollog.error("this command is not supported by this profile")
|
||||
return
|
||||
module_kset = None
|
||||
|
||||
if not module_kset:
|
||||
vollog.error("this command is not supported by this profile")
|
||||
raise TypeError("This plugin requires the module_kset structure. This structure is not present in the supplied symbol table. This means you are either analyzing an unsupported kernel version or that your symbol table is corrupt.")
|
||||
|
||||
ret = {}
|
||||
|
||||
@@ -84,4 +76,4 @@ class check_modules(plugins.PluginInterface):
|
||||
|
||||
def run(self):
|
||||
return renderers.TreeGrid([("Module Address", format_hints.Hex),
|
||||
("Module Name", str)], self._generator())
|
||||
("Module Name", str)], self._generator())
|
||||
|
||||
Reference in New Issue
Block a user