PEBMASQ: parameterize _generator v2

This commit is contained in:
SolitudePy
2025-09-17 02:02:14 +03:00
parent f79a6d6643
commit bcc6ce68c5
@@ -209,12 +209,12 @@ class PebMasquerade(interfaces.plugins.PluginInterface):
peb_cmdline,
)
def _generator(self, pids):
def _generator(self, pids, context, kernel_module_name):
pid_filter = pslist.PsList.create_pid_filter(pids)
for proc in pslist.PsList.list_processes(
context=self.context,
kernel_module_name=self.config["kernel"],
context=context,
kernel_module_name=kernel_module_name,
filter_func=pid_filter,
):
proc_id = proc.UniqueProcessId
@@ -360,6 +360,8 @@ class PebMasquerade(interfaces.plugins.PluginInterface):
def run(self):
pids = self.config.get("pid", None)
context = self.context
kernel_module_name = self.config["kernel"]
return renderers.TreeGrid(
[
("PID", int),
@@ -370,5 +372,5 @@ class PebMasquerade(interfaces.plugins.PluginInterface):
("PEB_CommandLine_Path", str),
("Notes", str),
],
self._generator(pids),
self._generator(pids, context, kernel_module_name),
)