mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-08 18:57:38 +02:00
#1473 - black fixes
This commit is contained in:
@@ -87,10 +87,18 @@ class GetServiceSIDs(interfaces.plugins.PluginInterface):
|
||||
# Get ControlSet\Services.
|
||||
try:
|
||||
services = hive.get_key(r"CurrentControlSet\Services")
|
||||
except (KeyError, exceptions.InvalidAddressException, registry.RegistryFormatException):
|
||||
except (
|
||||
KeyError,
|
||||
exceptions.InvalidAddressException,
|
||||
registry.RegistryFormatException,
|
||||
):
|
||||
try:
|
||||
services = hive.get_key(r"ControlSet001\Services")
|
||||
except (KeyError, exceptions.InvalidAddressException, registry.RegistryFormatException):
|
||||
except (
|
||||
KeyError,
|
||||
exceptions.InvalidAddressException,
|
||||
registry.RegistryFormatException,
|
||||
):
|
||||
continue
|
||||
|
||||
if services:
|
||||
|
||||
@@ -158,7 +158,11 @@ class GetSIDs(interfaces.plugins.PluginInterface):
|
||||
layers.registry.RegistryFormatException,
|
||||
):
|
||||
continue
|
||||
except (KeyError, exceptions.InvalidAddressException, layers.registry.RegistryFormatException):
|
||||
except (
|
||||
KeyError,
|
||||
exceptions.InvalidAddressException,
|
||||
layers.registry.RegistryFormatException,
|
||||
):
|
||||
continue
|
||||
|
||||
return sids
|
||||
|
||||
@@ -173,10 +173,14 @@ class UserAssist(interfaces.plugins.PluginInterface, timeliner.TimeLinerInterfac
|
||||
return_list=True,
|
||||
)
|
||||
except RegistryFormatException as e:
|
||||
vollog.warning(f"Error accessing UserAssist key in {hive_name} at {hive.hive_offset:#x}")
|
||||
vollog.warning(
|
||||
f"Error accessing UserAssist key in {hive_name} at {hive.hive_offset:#x}"
|
||||
)
|
||||
return None
|
||||
except KeyError:
|
||||
vollog.warning(f"UserAssist key not found in {hive_name} at {hive.hive_offset:#x}")
|
||||
vollog.warning(
|
||||
f"UserAssist key not found in {hive_name} at {hive.hive_offset:#x}"
|
||||
)
|
||||
return None
|
||||
|
||||
if not userassist_node_path:
|
||||
|
||||
@@ -159,12 +159,20 @@ class SvcScan(interfaces.plugins.PluginInterface):
|
||||
return cast(
|
||||
objects.StructType, hive.get_key(r"CurrentControlSet\Services")
|
||||
)
|
||||
except (KeyError, exceptions.InvalidAddressException, registry.RegistryFormatException):
|
||||
except (
|
||||
KeyError,
|
||||
exceptions.InvalidAddressException,
|
||||
registry.RegistryFormatException,
|
||||
):
|
||||
try:
|
||||
return cast(
|
||||
objects.StructType, hive.get_key(r"ControlSet001\Services")
|
||||
)
|
||||
except (KeyError, exceptions.InvalidAddressException, registry.RegistryFormatException):
|
||||
except (
|
||||
KeyError,
|
||||
exceptions.InvalidAddressException,
|
||||
registry.RegistryFormatException,
|
||||
):
|
||||
vollog.log(
|
||||
constants.LOGLEVEL_VVVV,
|
||||
"Could not retrieve any control set from SYSTEM hive",
|
||||
|
||||
Reference in New Issue
Block a user