Skip to content

Commit 61a2f78

Browse files
committed
fix black linting in linux.proc plugin
1 parent 18a9f89 commit 61a2f78

File tree

1 file changed

+0
-10
lines changed
  • volatility3/framework/plugins/linux

1 file changed

+0
-10
lines changed

volatility3/framework/plugins/linux/proc.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ def vma_dump(
124124
)
125125
)
126126
return None
127-
128127
vm_size = vm_end - vm_start
129128

130129
# check if vm_size is negative, this should never happen.
@@ -133,14 +132,12 @@ def vma_dump(
133132
f"Skip virtual memory dump for pid {pid} between {vm_start:#x}-{vm_end:#x} as {vm_size} is negative."
134133
)
135134
return None
136-
137135
# check if vm_size is larger than the maxsize limit, and therefore is not saved out.
138136
if maxsize <= vm_size:
139137
vollog.warning(
140138
f"Skip virtual memory dump for pid {pid} between {vm_start:#x}-{vm_end:#x} as {vm_size} is larger than maxsize limit of {maxsize}"
141139
)
142140
return None
143-
144141
proc_layer = context.layers[proc_layer_name]
145142
file_name = f"pid.{pid}.vma.{vm_start:#x}-{vm_end:#x}.dmp"
146143
try:
@@ -152,11 +149,9 @@ def vma_dump(
152149
data = proc_layer.read(offset, to_read, pad=True)
153150
file_handle.write(data)
154151
offset += to_read
155-
156152
except Exception as excp:
157153
vollog.debug(f"Unable to dump virtual memory {file_name}: {excp}")
158154
return None
159-
160155
return file_handle
161156

162157
def _generator(self, tasks):
@@ -179,11 +174,9 @@ def vma_filter_function(x: interfaces.objects.ObjectInterface) -> bool:
179174
return False
180175

181176
vma_filter_func = vma_filter_function
182-
183177
for task in tasks:
184178
if not task.mm:
185179
continue
186-
187180
name = utility.array_to_string(task.comm)
188181

189182
for vma in self.list_vmas(task, filter_func=vma_filter_func):
@@ -200,7 +193,6 @@ def vma_filter_function(x: interfaces.objects.ObjectInterface) -> bool:
200193
major = inode_object.i_sb.major
201194
minor = inode_object.i_sb.minor
202195
inode = inode_object.i_ino
203-
204196
path = vma.get_name(self.context, task)
205197

206198
file_output = "Disabled"
@@ -215,7 +207,6 @@ def vma_filter_function(x: interfaces.objects.ObjectInterface) -> bool:
215207
)
216208
vm_start = None
217209
vm_end = None
218-
219210
if vm_start and vm_end:
220211
# only attempt to dump the memory if we have vm_start and vm_end
221212
file_handle = self.vma_dump(
@@ -230,7 +221,6 @@ def vma_filter_function(x: interfaces.objects.ObjectInterface) -> bool:
230221
if file_handle:
231222
file_handle.close()
232223
file_output = file_handle.preferred_filename
233-
234224
yield (
235225
0,
236226
(

0 commit comments

Comments
 (0)