Skip to content

Commit 143062c

Browse files
committed
cosmetics
1 parent 8fd8f7f commit 143062c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

volatility3/framework/plugins/linux/process_spoofing.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,12 @@ def _get_executable_path(
6060
try:
6161
mm = task.mm
6262
if not mm or not mm.is_readable():
63-
# Kernel threads doesn't have
63+
# Kernel threads doesn't have mm
6464
return None
6565

6666
exe_file = mm.exe_file
6767
if not exe_file or not exe_file.is_readable():
6868
return None
69-
70-
# Use LinuxUtilities.path_for_file to extract the path
7169
exe_path = linux.LinuxUtilities.path_for_file(self.context, task, exe_file)
7270

7371
return exe_path if exe_path else None
@@ -97,15 +95,12 @@ def _get_cmdline_basename(
9795
return None
9896

9997
proc_layer = self.context.layers[proc_layer_name]
100-
101-
# Read argv from userland
10298
start = task.mm.arg_start
10399
size_to_read = task.mm.arg_end - task.mm.arg_start
104100

105101
if not (0 < size_to_read <= 4096):
106102
return None
107103

108-
# Attempt to read command line arguments
109104
try:
110105
argv = proc_layer.read(start, size_to_read)
111106
except exceptions.InvalidAddressException:
@@ -176,7 +171,7 @@ def _detect_spoofing(
176171
"""
177172
notes = []
178173

179-
# Count how many name sources we have
174+
# Skip kernel threads
180175
available_sources = sum(
181176
1 for name in [exe_basename, cmdline_basename, comm] if name
182177
)

0 commit comments

Comments
 (0)