mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-09 19:27:39 +02:00
Merge pull request #1424 from j-t-1/readability
Use generator expressions
This commit is contained in:
@@ -203,7 +203,7 @@ class Volshell(interfaces.plugins.PluginInterface):
|
||||
connector = " "
|
||||
if chunk_size < 2:
|
||||
connector = ""
|
||||
ascii_data = connector.join([self._ascii_bytes(x) for x in valid_data])
|
||||
ascii_data = connector.join(self._ascii_bytes(x) for x in valid_data)
|
||||
|
||||
print(hex(offset), " ", hex_data, " ", ascii_data)
|
||||
offset += 16
|
||||
|
||||
@@ -47,8 +47,8 @@ def require_interface_version(*args) -> None:
|
||||
if args[1] > interface_version()[1]:
|
||||
raise RuntimeError(
|
||||
"Framework interface version {} is an older revision than the required version {}".format(
|
||||
".".join([str(x) for x in interface_version()[0:2]]),
|
||||
".".join([str(x) for x in args[0:2]]),
|
||||
".".join(str(x) for x in interface_version()[0:2]),
|
||||
".".join(str(x) for x in args[0:2]),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -532,7 +532,7 @@ class VersionRequirement(interfaces.configuration.RequirementInterface):
|
||||
if version is None:
|
||||
raise TypeError("Version cannot be None")
|
||||
if description is None:
|
||||
description = f"Version {'.'.join([str(x) for x in version])} dependency on {component.__module__}.{component.__name__} unmet"
|
||||
description = f"Version {'.'.join(str(x) for x in version)} dependency on {component.__module__}.{component.__name__} unmet"
|
||||
super().__init__(
|
||||
name=name, description=description, default=default, optional=optional
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ VERSION_PATCH = 0 # Number of changes that do not change the interface
|
||||
VERSION_SUFFIX = ""
|
||||
|
||||
PACKAGE_VERSION = (
|
||||
".".join([str(x) for x in [VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH]])
|
||||
".".join(str(x) for x in [VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH])
|
||||
+ VERSION_SUFFIX
|
||||
)
|
||||
"""The canonical version of the volatility3 package"""
|
||||
|
||||
@@ -55,7 +55,7 @@ class Check_creds(interfaces.plugins.PluginInterface):
|
||||
|
||||
for cred_addr, pids in creds.items():
|
||||
if len(pids) > 1:
|
||||
pid_str = ", ".join([str(pid) for pid in pids])
|
||||
pid_str = ", ".join(str(pid) for pid in pids)
|
||||
|
||||
fields = [
|
||||
format_hints.Hex(cred_addr),
|
||||
|
||||
@@ -26,7 +26,7 @@ def createservicesid(svc) -> str:
|
||||
## The use of struct here is OK. It doesn't make much sense
|
||||
## to leverage obj.Object inside this loop.
|
||||
dec.append(struct.unpack("<I", sha[i * 4 : i * 4 + 4])[0])
|
||||
return "S-1-5-80-" + "-".join([str(n) for n in dec])
|
||||
return "S-1-5-80-" + "-".join(str(n) for n in dec)
|
||||
|
||||
|
||||
class GetServiceSIDs(interfaces.plugins.PluginInterface):
|
||||
|
||||
Reference in New Issue
Block a user