From 3ebee83d05ca6d82361b85fa265a8de64bafff44 Mon Sep 17 00:00:00 2001 From: David McDonald Date: Fri, 27 Sep 2024 16:18:27 -0500 Subject: [PATCH] Windows: psxview cleanup Replaced this series of statements with a single invocation of the `all` builtin for brevity and conciseness. --- volatility3/framework/plugins/windows/psxview.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/volatility3/framework/plugins/windows/psxview.py b/volatility3/framework/plugins/windows/psxview.py index 18ab3ca2f..b7a372a40 100644 --- a/volatility3/framework/plugins/windows/psxview.py +++ b/volatility3/framework/plugins/windows/psxview.py @@ -75,11 +75,8 @@ class PsXView(plugins.PluginInterface): "string", max_length=proc.ImageFileName.vol.count, errors="replace" ) - def _is_valid_proc_name(self, str): - for c in str: - if not c in self.valid_proc_name_chars: - return False - return True + def _is_valid_proc_name(self, string: str) -> bool: + return all(c in self.valid_proc_name_chars for c in string) def _filter_garbage_procs( self, proc_list: Iterable[extensions.EPROCESS]