From a3dfb9661fee5a6e9a837c2cb9794ebd818d6480 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Wed, 27 Feb 2019 17:33:08 +0000 Subject: [PATCH] Update create_filter method to actually filter appropriately. --- volatility/framework/plugins/windows/pslist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/volatility/framework/plugins/windows/pslist.py b/volatility/framework/plugins/windows/pslist.py index 3e48ef788..3c75a7303 100644 --- a/volatility/framework/plugins/windows/pslist.py +++ b/volatility/framework/plugins/windows/pslist.py @@ -51,13 +51,13 @@ class PsList(plugins.PluginInterface, timeliner.TimeLinerInterface): ] @classmethod - def create_filter(cls, pid_list: List[int] = None) -> Callable[[int], bool]: + def create_filter(cls, pid_list: List[int] = None) -> Callable[[interfaces.objects.ObjectInterface], bool]: filter_func = lambda _: False # FIXME: mypy #4973 or #2608 pid_list = pid_list or [] filter_list = [x for x in pid_list if x is not None] if filter_list: - filter_func = lambda x: x not in filter_list + filter_func = lambda x: x.UniqueProcessId not in filter_list return filter_func @classmethod