Skip to content

Commit 9d98ab9

Browse files
author
Dave Lassalle
committed
#816 - black fixes
1 parent 48d4048 commit 9d98ab9

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

volatility3/framework/plugins/windows/consoles.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -244,15 +244,19 @@ def determine_conhost_version(
244244
configuration.path_join(config_path, "conhost"),
245245
"windows",
246246
"pe",
247-
class_types=pe.class_types
247+
class_types=pe.class_types,
248248
)
249249

250250
try:
251-
(major, minor, product, build) = verinfo.VerInfo.get_version_information(
252-
context, pe_table_name, conhost_layer_name, conhost_base
251+
(major, minor, product, build) = (
252+
verinfo.VerInfo.get_version_information(
253+
context, pe_table_name, conhost_layer_name, conhost_base
254+
)
253255
)
254256
conhost_mod_version = build
255-
vollog.debug(f"Found conhost.exe version {major}.{minor}.{product}.{build} in {conhost_layer_name} at base {conhost_base:#x}")
257+
vollog.debug(
258+
f"Found conhost.exe version {major}.{minor}.{product}.{build} in {conhost_layer_name} at base {conhost_base:#x}"
259+
)
256260
except (exceptions.InvalidAddressException, TypeError, AttributeError):
257261
# the following is IntelLayer specific and might need to be adapted to other architectures.
258262
physical_layer_name = context.layers[layer_name].config.get(
@@ -432,7 +436,7 @@ def get_console_info(
432436
kernel_table_name,
433437
config_path,
434438
proc_layer_name,
435-
conhostexe_base
439+
conhostexe_base,
436440
)
437441

438442
conhost_module = context.module(
@@ -620,7 +624,9 @@ def get_console_info(
620624
"data": exe_alias_list.get_exename(),
621625
}
622626
)
623-
for alias_index, alias in enumerate(exe_alias_list.get_aliases()):
627+
for alias_index, alias in enumerate(
628+
exe_alias_list.get_aliases()
629+
):
624630
console_properties.append(
625631
{
626632
"level": 3,
@@ -722,7 +728,9 @@ def get_console_info(
722728
)
723729

724730
try:
725-
vollog.debug(f"Getting ScreenBuffer entries for {console_info}")
731+
vollog.debug(
732+
f"Getting ScreenBuffer entries for {console_info}"
733+
)
726734
console_properties.append(
727735
{
728736
"level": 1,
@@ -895,7 +903,9 @@ def _generator(
895903
),
896904
)
897905
else:
898-
vollog.warn(f"_CONSOLE_INFORMATION not found for {process_name} with pid {process_pid}.")
906+
vollog.warn(
907+
f"_CONSOLE_INFORMATION not found for {process_name} with pid {process_pid}."
908+
)
899909

900910
if proc is None:
901911
vollog.warn("No conhost.exe processes found.")

volatility3/framework/symbols/windows/extensions/consoles.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def get_text(self, truncate=True):
6464
line = "".join(
6565
(
6666
char_row[i : i + 2].decode("utf-16le", errors="replace")
67-
if self._valid_dbcs(char_row[i + 2], char_row[i+1])
67+
if self._valid_dbcs(char_row[i + 2], char_row[i + 1])
6868
else ""
6969
)
7070
for i in range(0, len(char_row), 3)
@@ -108,6 +108,7 @@ def get_target(self):
108108
"string", encoding="utf-16", errors="replace", max_length=512
109109
)
110110

111+
111112
class EXE_ALIAS_LIST(objects.StructType):
112113
"""An Exe Alias List Structure"""
113114

@@ -284,7 +285,7 @@ def get_exe_aliases(self):
284285
exe_alias_list = exe_alias_list.dereference()
285286
for exe_alias_list_item in exe_alias_list.to_list(
286287
f"{self.get_symbol_table_name()}{constants.BANG}_EXE_ALIAS_LIST",
287-
"ListEntry"
288+
"ListEntry",
288289
):
289290
yield exe_alias_list_item
290291

0 commit comments

Comments
 (0)