Skip to content

Commit

Permalink
Windows: Fix black on dumpfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
ikelos committed Jan 29, 2024
1 parent b211dc1 commit 497d291
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions volatility3/framework/plugins/windows/dumpfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def get_requirements(cls) -> List[interfaces.configuration.RequirementInterface]
optional=True,
),
requirements.StringRequirement(
name="filter", description="Dump files matching regular expression FILTER", optional=True
name="filter",
description="Dump files matching regular expression FILTER",
optional=True,
),
requirements.BooleanRequirement(
name="ignore-case",
Expand Down Expand Up @@ -223,7 +225,6 @@ def _generator(self, procs: List, offsets: List):
flags = re.I if self.config["ignore-case"] else 0
file_re = re.compile(self.config["filter"], flags)


if procs:
# The handles plugin doesn't expose any staticmethod/classmethod, and it also requires stashing
# private variables, so we need an instance (for now, anyway). We _could_ call Handles._generator()
Expand Down Expand Up @@ -345,7 +346,9 @@ def run(self):
procs = list()
kernel = self.context.modules[self.config["kernel"]]

if self.config["filter"] and (self.config["virtaddr"] or self.config["physaddr"]):
if self.config["filter"] and (
self.config["virtaddr"] or self.config["physaddr"]
):
raise ValueError("Cannot use filter flag with an address flag")

if self.config.get("virtaddr", None) is not None:
Expand Down

0 comments on commit 497d291

Please sign in to comment.