Skip to content

Commit 19499d5

Browse files
committed
Linux: update pslist with classmethod for get_task_fields
1 parent c08dda8 commit 19499d5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

volatility3/framework/plugins/linux/pslist.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class PsList(interfaces.plugins.PluginInterface):
1717

1818
_required_framework_version = (2, 0, 0)
1919

20-
_version = (2, 1, 1)
20+
_version = (2, 2, 0)
2121

2222
@classmethod
2323
def get_requirements(cls) -> List[interfaces.configuration.RequirementInterface]:
@@ -78,8 +78,9 @@ def filter_func(x):
7878
else:
7979
return lambda _: False
8080

81-
def _get_task_fields(
82-
self, task: interfaces.objects.ObjectInterface, decorate_comm: bool = False
81+
@classmethod
82+
def get_task_fields(
83+
cls, task: interfaces.objects.ObjectInterface, decorate_comm: bool = False
8384
) -> Tuple[int, int, int, str]:
8485
"""Extract the fields needed for the final output
8586
Args:
@@ -101,7 +102,7 @@ def _get_task_fields(
101102
elif task.is_user_thread:
102103
name = f"{{{name}}}"
103104

104-
task_fields = (format_hints.Hex(task.vol.offset), pid, tid, ppid, name)
105+
task_fields = (task.vol.offset, pid, tid, ppid, name)
105106
return task_fields
106107

107108
def _get_file_output(self, task: interfaces.objects.ObjectInterface) -> str:
@@ -174,10 +175,10 @@ def _generator(
174175
else:
175176
file_output = "Disabled"
176177

177-
offset, pid, tid, ppid, name = self._get_task_fields(task, decorate_comm)
178+
offset, pid, tid, ppid, name = self.get_task_fields(task, decorate_comm)
178179

179180
yield 0, (
180-
offset,
181+
format_hints.Hex(offset),
181182
pid,
182183
tid,
183184
ppid,

0 commit comments

Comments
 (0)