Skip to content

Commit

Permalink
Change file for paths that contain wildcard to glob
Browse files Browse the repository at this point in the history
  • Loading branch information
Miauwkeru committed Jul 7, 2023
1 parent eb0eb8a commit 8b488de
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions acquire/acquire.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ class AV(Module):
("glob", "sysvol/ProgramData/Emsisoft/Reports/scan*.txt"),
# F-Secure
("dir", "sysvol/ProgramData/F-Secure/Log"),
("dir", "sysvol/Users*/AppData/Local/F-Secure/Log"),
("glob", "sysvol/Users*/AppData/Local/F-Secure/Log"),
("dir", "sysvol/ProgramData/F-Secure/Antivirus/ScheduledScanReports"),
# HitmanPro
("dir", "sysvol/ProgramData/HitmanPro/Logs"),
Expand Down Expand Up @@ -970,7 +970,7 @@ class History(Module):
("dir", "AppData/Local/Microsoft/Internet Explorer/Recovery", from_user_home),
("file", "AppData/Local/Microsoft/Windows/History/History.IE5/index.dat", from_user_home),
(
"file",
"glob",
"AppData/Local/Microsoft/Windows/History/History.IE5/MSHist*/index.dat",
from_user_home,
),
Expand All @@ -980,7 +980,7 @@ class History(Module):
from_user_home,
),
(
"file",
"glob",
"AppData/Local/Microsoft/Windows/History/Low/History.IE5/MSHist*/index.dat",
from_user_home,
),
Expand Down
13 changes: 13 additions & 0 deletions tests/test_glob.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import pytest

from acquire.acquire import MODULES


@pytest.mark.parametrize("module", MODULES.keys())
def test_validate_module_spec(module):
for spec in MODULES[module].SPEC:
type, collectable, *_ = spec
if type == "glob":
assert "*" in collectable
else:
assert "*" not in collectable

0 comments on commit 8b488de

Please sign in to comment.