mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-12 20:57:39 +02:00
Apply Black Python linter to mac.pslist plugin
Applied the Black Python linter to the mac PsList plugin, resulting in more readable and consistent code formatting.
This commit is contained in:
@@ -114,11 +114,12 @@ class PsList(interfaces.plugins.PluginInterface):
|
||||
gid = task.p_gid
|
||||
start_time_seconds = task.p_start.tv_sec
|
||||
start_time_microseconds = task.p_start.tv_usec
|
||||
start_time = datetime.datetime.fromtimestamp(start_time_seconds + start_time_microseconds / 1e6)
|
||||
|
||||
start_time = datetime.datetime.fromtimestamp(
|
||||
start_time_seconds + start_time_microseconds / 1e6
|
||||
)
|
||||
|
||||
ppid = task.p_ppid
|
||||
|
||||
|
||||
yield (0, (offset, name, pid, uid, gid, start_time, ppid))
|
||||
|
||||
@classmethod
|
||||
@@ -321,5 +322,14 @@ class PsList(interfaces.plugins.PluginInterface):
|
||||
|
||||
def run(self):
|
||||
return renderers.TreeGrid(
|
||||
[("OFFSET", format_hints.Hex), ("NAME", str), ("PID", int), ("UID", int), ("GID", int), ("Start Time", datetime.datetime), ("PPID", int)], self._generator()
|
||||
[
|
||||
("OFFSET", format_hints.Hex),
|
||||
("NAME", str),
|
||||
("PID", int),
|
||||
("UID", int),
|
||||
("GID", int),
|
||||
("Start Time", datetime.datetime),
|
||||
("PPID", int),
|
||||
],
|
||||
self._generator(),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user