diff --git a/volatility/framework/plugins/linux/bash.py b/volatility/framework/plugins/linux/bash.py index f837e6404..7c3a78742 100644 --- a/volatility/framework/plugins/linux/bash.py +++ b/volatility/framework/plugins/linux/bash.py @@ -79,20 +79,21 @@ class Bash(plugins.PluginInterface, timeliner.TimeLinerInterface): yield (0, (task.pid, task_name, hist.get_time_object(), hist.get_command())) def run(self): - filt = pslist.PsList.create_filter([self.config.get('pid', None)]) + filter_func = pslist.PsList.create_filter([self.config.get('pid', None)]) plugin = pslist.PsList.list_tasks return renderers.TreeGrid( [("PID", int), ("Process", str), ("CommandTime", datetime.datetime), ("Command", str)], - self._generator(plugin(self.context, self.config['primary'], self.config['vmlinux'], filter = filt))) + self._generator(plugin(self.context, self.config['primary'], self.config['vmlinux'], filter = filter_func))) def generate_timeline(self): - filt = pslist.PsList.create_filter([self.config.get('pid', None)]) + filter_func = pslist.PsList.create_filter([self.config.get('pid', None)]) plugin = pslist.PsList.list_tasks - for row in self._generator(plugin(self.context, self.config['primary'], self.config['vmlinux'], filter = filt)): + for row in self._generator( + plugin(self.context, self.config['primary'], self.config['vmlinux'], filter = filter_func)): _depth, row_data = row description = "{} ({}): \"{}\"".format(row_data[0], row_data[1], row_data[3]) yield (description, timeliner.TimeLinerType.CREATED, row_data[2]) diff --git a/volatility/framework/plugins/linux/elfs.py b/volatility/framework/plugins/linux/elfs.py index 0fefeff10..d3ad5bb55 100644 --- a/volatility/framework/plugins/linux/elfs.py +++ b/volatility/framework/plugins/linux/elfs.py @@ -43,11 +43,11 @@ class Elfs(plugins.PluginInterface): yield (0, (task.pid, name, format_hints.Hex(vma.vm_start), format_hints.Hex(vma.vm_end), path)) def run(self): - filt = pslist.PsList.create_filter([self.config.get('pid', None)]) + filter_func = pslist.PsList.create_filter([self.config.get('pid', None)]) plugin = pslist.PsList.list_tasks return renderers.TreeGrid( [("PID", int), ("Process", str), ("Start", format_hints.Hex), ("End", format_hints.Hex), ("File Path", str)], - self._generator(plugin(self.context, self.config['primary'], self.config['vmlinux'], filter = filt))) + self._generator(plugin(self.context, self.config['primary'], self.config['vmlinux'], filter = filter_func))) diff --git a/volatility/framework/plugins/linux/malfind.py b/volatility/framework/plugins/linux/malfind.py index 0d4be3d7f..403bef9ba 100644 --- a/volatility/framework/plugins/linux/malfind.py +++ b/volatility/framework/plugins/linux/malfind.py @@ -59,11 +59,11 @@ class Malfind(interfaces_plugins.PluginInterface): vma.get_protection(), format_hints.HexBytes(data), disasm)) def run(self): - filt = pslist.PsList.create_filter([self.config.get('pid', None)]) + filter_func = pslist.PsList.create_filter([self.config.get('pid', None)]) plugin = pslist.PsList.list_tasks return renderers.TreeGrid( [("PID", int), ("Process", str), ("Start", format_hints.Hex), ("End", format_hints.Hex), ("Protection", str), ("Hexdump", format_hints.HexBytes), ("Disasm", interfaces_renderers.Disassembly)], - self._generator(plugin(self.context, self.config['primary'], self.config['vmlinux'], filter = filt))) + self._generator(plugin(self.context, self.config['primary'], self.config['vmlinux'], filter = filter_func))) diff --git a/volatility/framework/plugins/mac/bash.py b/volatility/framework/plugins/mac/bash.py index 1979db141..e628a7e3d 100644 --- a/volatility/framework/plugins/mac/bash.py +++ b/volatility/framework/plugins/mac/bash.py @@ -90,11 +90,12 @@ class Bash(plugins.PluginInterface, timeliner.TimeLinerInterface): self._generator(plugin(self.context, self.config['primary'], self.config['darwin'], filter = filter))) def generate_timeline(self): - filt = pslist.PsList.create_filter([self.config.get('pid', None)]) + filter_func = pslist.PsList.create_filter([self.config.get('pid', None)]) plugin = pslist.PsList.list_tasks - for row in self._generator(plugin(self.context, self.config['primary'], self.config['darwin'], filter = filt)): + for row in self._generator( + plugin(self.context, self.config['primary'], self.config['darwin'], filter = filter_func)): _depth, row_data = row description = "{} ({}): \"{}\"".format(row_data[0], row_data[1], row_data[3]) yield (description, timeliner.TimeLinerType.CREATED, row_data[2]) diff --git a/volatility/framework/plugins/mac/malfind.py b/volatility/framework/plugins/mac/malfind.py index 11f9fe35d..49796be20 100644 --- a/volatility/framework/plugins/mac/malfind.py +++ b/volatility/framework/plugins/mac/malfind.py @@ -57,11 +57,11 @@ class Malfind(interfaces_plugins.PluginInterface): vma.get_perms(), format_hints.HexBytes(data), disasm)) def run(self): - filt = pslist.PsList.create_filter([self.config.get('pid', None)]) + filter_func = pslist.PsList.create_filter([self.config.get('pid', None)]) plugin = pslist.PsList.list_tasks return renderers.TreeGrid( [("PID", int), ("Process", str), ("Start", format_hints.Hex), ("End", format_hints.Hex), ("Protection", str), ("Hexdump", format_hints.HexBytes), ("Disasm", interfaces_renderers.Disassembly)], - self._generator(plugin(self.context, self.config['primary'], self.config['darwin'], filter = filt))) + self._generator(plugin(self.context, self.config['primary'], self.config['darwin'], filter = filter_func))) diff --git a/volatility/framework/plugins/mac/psaux.py b/volatility/framework/plugins/mac/psaux.py index bcc09d8a0..be5428fff 100644 --- a/volatility/framework/plugins/mac/psaux.py +++ b/volatility/framework/plugins/mac/psaux.py @@ -81,10 +81,10 @@ class Psaux(plugins.PluginInterface): yield (0, (task.p_pid, task_name, task.p_argc, args_str)) def run(self) -> renderers.TreeGrid: - filt = pslist.PsList.create_filter([self.config.get('pid', None)]) + filter_func = pslist.PsList.create_filter([self.config.get('pid', None)]) plugin = pslist.PsList.list_tasks return renderers.TreeGrid( [("PID", int), ("Process", str), ("Argc", int), ("Arguments", str)], - self._generator(plugin(self.context, self.config['primary'], self.config['darwin'], filter = filt))) + self._generator(plugin(self.context, self.config['primary'], self.config['darwin'], filter = filter_func))) diff --git a/volatility/framework/plugins/mac/pslist.py b/volatility/framework/plugins/mac/pslist.py index cf70e447e..7e562ede3 100644 --- a/volatility/framework/plugins/mac/pslist.py +++ b/volatility/framework/plugins/mac/pslist.py @@ -27,7 +27,7 @@ class PsList(interfaces_plugins.PluginInterface): def nullfilter(): return False - filt = nullfilter + filter_func = nullfilter # FIXME: mypy #4973 or #2608 pid_list = pid_list or [] filter_list = [x for x in pid_list if x is not None] @@ -36,8 +36,8 @@ class PsList(interfaces_plugins.PluginInterface): def list_filter(x): return x not in filter_list - filt = list_filter - return filt + filter_func = list_filter + return filter_func def _generator(self): for task in self.list_tasks( diff --git a/volatility/framework/plugins/mac/pstree.py b/volatility/framework/plugins/mac/pstree.py index a3fea6560..d7fcdcb06 100644 --- a/volatility/framework/plugins/mac/pstree.py +++ b/volatility/framework/plugins/mac/pstree.py @@ -22,7 +22,7 @@ class PsTree(plugins.PluginInterface): requirements.SymbolRequirement(name = "darwin", description = "Mac Kernel") ] - def find_level(self, pid): + def _find_level(self, pid): """Finds how deep the pid is in the processes list""" seen = set([]) seen.add(pid) @@ -44,7 +44,7 @@ class PsTree(plugins.PluginInterface): # Build the child/level maps for pid in self._processes: - self.find_level(pid) + self._find_level(pid) def yield_processes(pid): proc = self._processes[pid]