Skip to content

Commit 57de357

Browse files
committed
Timeliner plugin: Fix issue with filtering TimeLinerInterface plugins and using the filter argument
1 parent e76d512 commit 57de357

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

volatility3/framework/plugins/timeliner.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class Timeliner(interfaces.plugins.PluginInterface):
4545
orders the results by time."""
4646

4747
_required_framework_version = (2, 0, 0)
48+
_version = (1, 1, 0)
4849

4950
def __init__(self, *args, **kwargs):
5051
super().__init__(*args, **kwargs)
@@ -245,6 +246,17 @@ def run(self):
245246
filter_list = self.config["plugin-filter"]
246247
# Identify plugins that we can run which output datetimes
247248
for plugin_class in self.usable_plugins:
249+
if not issubclass(plugin_class, TimeLinerInterface):
250+
continue
251+
252+
if filter_list and not any(
253+
[
254+
filter in plugin_class.__module__ + "." + plugin_class.__name__
255+
for filter in filter_list
256+
]
257+
):
258+
continue
259+
248260
try:
249261
automagics = automagic.choose_automagic(self.automagics, plugin_class)
250262

@@ -276,15 +288,8 @@ def run(self):
276288
config_value,
277289
)
278290

279-
if isinstance(plugin, TimeLinerInterface):
280-
if not len(filter_list) or any(
281-
[
282-
filter
283-
in plugin.__module__ + "." + plugin.__class__.__name__
284-
for filter in filter_list
285-
]
286-
):
287-
plugins_to_run.append(plugin)
291+
plugins_to_run.append(plugin)
292+
288293
except exceptions.UnsatisfiedException as excp:
289294
# Remove the failed plugin from the list and continue
290295
vollog.debug(

0 commit comments

Comments
 (0)