mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-12 12:47:39 +02:00
#816 - black fixes
This commit is contained in:
@@ -244,15 +244,19 @@ class Consoles(interfaces.plugins.PluginInterface):
|
||||
configuration.path_join(config_path, "conhost"),
|
||||
"windows",
|
||||
"pe",
|
||||
class_types=pe.class_types
|
||||
class_types=pe.class_types,
|
||||
)
|
||||
|
||||
try:
|
||||
(major, minor, product, build) = verinfo.VerInfo.get_version_information(
|
||||
context, pe_table_name, conhost_layer_name, conhost_base
|
||||
(major, minor, product, build) = (
|
||||
verinfo.VerInfo.get_version_information(
|
||||
context, pe_table_name, conhost_layer_name, conhost_base
|
||||
)
|
||||
)
|
||||
conhost_mod_version = build
|
||||
vollog.debug(f"Found conhost.exe version {major}.{minor}.{product}.{build} in {conhost_layer_name} at base {conhost_base:#x}")
|
||||
vollog.debug(
|
||||
f"Found conhost.exe version {major}.{minor}.{product}.{build} in {conhost_layer_name} at base {conhost_base:#x}"
|
||||
)
|
||||
except (exceptions.InvalidAddressException, TypeError, AttributeError):
|
||||
# the following is IntelLayer specific and might need to be adapted to other architectures.
|
||||
physical_layer_name = context.layers[layer_name].config.get(
|
||||
@@ -432,7 +436,7 @@ class Consoles(interfaces.plugins.PluginInterface):
|
||||
kernel_table_name,
|
||||
config_path,
|
||||
proc_layer_name,
|
||||
conhostexe_base
|
||||
conhostexe_base,
|
||||
)
|
||||
|
||||
conhost_module = context.module(
|
||||
@@ -620,7 +624,9 @@ class Consoles(interfaces.plugins.PluginInterface):
|
||||
"data": exe_alias_list.get_exename(),
|
||||
}
|
||||
)
|
||||
for alias_index, alias in enumerate(exe_alias_list.get_aliases()):
|
||||
for alias_index, alias in enumerate(
|
||||
exe_alias_list.get_aliases()
|
||||
):
|
||||
console_properties.append(
|
||||
{
|
||||
"level": 3,
|
||||
@@ -722,7 +728,9 @@ class Consoles(interfaces.plugins.PluginInterface):
|
||||
)
|
||||
|
||||
try:
|
||||
vollog.debug(f"Getting ScreenBuffer entries for {console_info}")
|
||||
vollog.debug(
|
||||
f"Getting ScreenBuffer entries for {console_info}"
|
||||
)
|
||||
console_properties.append(
|
||||
{
|
||||
"level": 1,
|
||||
@@ -895,7 +903,9 @@ class Consoles(interfaces.plugins.PluginInterface):
|
||||
),
|
||||
)
|
||||
else:
|
||||
vollog.warn(f"_CONSOLE_INFORMATION not found for {process_name} with pid {process_pid}.")
|
||||
vollog.warn(
|
||||
f"_CONSOLE_INFORMATION not found for {process_name} with pid {process_pid}."
|
||||
)
|
||||
|
||||
if proc is None:
|
||||
vollog.warn("No conhost.exe processes found.")
|
||||
|
||||
@@ -64,7 +64,7 @@ class ROW(objects.StructType):
|
||||
line = "".join(
|
||||
(
|
||||
char_row[i : i + 2].decode("utf-16le", errors="replace")
|
||||
if self._valid_dbcs(char_row[i + 2], char_row[i+1])
|
||||
if self._valid_dbcs(char_row[i + 2], char_row[i + 1])
|
||||
else ""
|
||||
)
|
||||
for i in range(0, len(char_row), 3)
|
||||
@@ -108,6 +108,7 @@ class ALIAS(objects.StructType):
|
||||
"string", encoding="utf-16", errors="replace", max_length=512
|
||||
)
|
||||
|
||||
|
||||
class EXE_ALIAS_LIST(objects.StructType):
|
||||
"""An Exe Alias List Structure"""
|
||||
|
||||
@@ -284,7 +285,7 @@ class CONSOLE_INFORMATION(objects.StructType):
|
||||
exe_alias_list = exe_alias_list.dereference()
|
||||
for exe_alias_list_item in exe_alias_list.to_list(
|
||||
f"{self.get_symbol_table_name()}{constants.BANG}_EXE_ALIAS_LIST",
|
||||
"ListEntry"
|
||||
"ListEntry",
|
||||
):
|
||||
yield exe_alias_list_item
|
||||
|
||||
|
||||
Reference in New Issue
Block a user