Skip to content

Commit 60f1447

Browse files
author
Dave Lassalle
committed
#816 - black fixes
1 parent a3c50e8 commit 60f1447

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

volatility3/framework/plugins/windows/cmdscan.py

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ def get_requirements(cls):
6565

6666
@classmethod
6767
def get_filtered_vads(
68-
cls, conhost_proc: interfaces.context.ContextInterface, size_filter: Optional[int]=0x40000000
68+
cls,
69+
conhost_proc: interfaces.context.ContextInterface,
70+
size_filter: Optional[int] = 0x40000000,
6971
) -> List[Tuple[int, int]]:
7072
"""
7173
Returns vads of a process with smaller than size_filter
@@ -129,7 +131,9 @@ def get_command_history(
129131
f"Found conhost process {conhost_proc} with pid {conhost_proc.UniqueProcessId}"
130132
)
131133

132-
conhostexe_base, conhostexe_size = consoles.Consoles.find_conhostexe(conhost_proc)
134+
conhostexe_base, conhostexe_size = consoles.Consoles.find_conhostexe(
135+
conhost_proc
136+
)
133137
if not conhostexe_base:
134138
vollog.info(
135139
"Unable to find the location of conhost.exe. Analysis cannot proceed."
@@ -154,7 +158,7 @@ def get_command_history(
154158
context,
155159
scanners.BytesScanner(max_history_bytes),
156160
sections=sections,
157-
):
161+
):
158162
command_history_properties = []
159163

160164
try:
@@ -272,18 +276,24 @@ def _generator(
272276
no_registry = self.config.get("no_registry")
273277

274278
if no_registry is False:
275-
max_history, _max_buffers = consoles.Consoles.get_console_settings_from_registry(
276-
self.context,
277-
self.config_path,
278-
kernel.layer_name,
279-
kernel.symbol_table_name,
280-
max_history,
281-
[],
279+
max_history, _max_buffers = (
280+
consoles.Consoles.get_console_settings_from_registry(
281+
self.context,
282+
self.config_path,
283+
kernel.layer_name,
284+
kernel.symbol_table_name,
285+
max_history,
286+
[],
287+
)
282288
)
283289

284290
vollog.debug(f"Possible CommandHistorySize values: {max_history}")
285291

286-
for proc, command_history, command_history_properties in self.get_command_history(
292+
for (
293+
proc,
294+
command_history,
295+
command_history_properties,
296+
) in self.get_command_history(
287297
self.context,
288298
kernel.layer_name,
289299
kernel.symbol_table_name,
@@ -305,7 +315,9 @@ def _generator(
305315
(
306316
renderers.NotApplicableValue()
307317
if command_history_property["address"] is None
308-
else format_hints.Hex(command_history_property["address"])
318+
else format_hints.Hex(
319+
command_history_property["address"]
320+
)
309321
),
310322
str(command_history_property["data"]),
311323
),

0 commit comments

Comments
 (0)