Skip to content

Commit 8c568dd

Browse files
committed
Add 'Snapshots' to history_dirs
1 parent fbd271e commit 8c568dd

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

acquire/acquire.py

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,35 +1096,36 @@ class QuarantinedFiles(Module):
10961096
@register_module("--history")
10971097
class History(Module):
10981098
DESC = "browser history from IE, Edge, Firefox, and Chrome"
1099-
BROWSER_ROOT_DIRS = namedtuple("BrowserRootDirs", ["root_dirs", "history_dirs"])
1099+
BROWSER_ROOT_DIRS = namedtuple("BrowserRootDirs", ["root_dirs", "dir_extensions", "history_dirs"])
11001100
COMMON_DIRS = {
11011101
"default": BROWSER_ROOT_DIRS(
11021102
[
11031103
# Chromium - RHEL/Ubuntu - DNF/apt
1104-
".config/chromium/*",
1104+
".config/chromium",
11051105
# Chrome - RHEL/Ubuntu - DNF
1106-
".config/google-chrome/*",
1106+
".config/google-chrome",
11071107
# Edge - RHEL/Ubuntu - DNF/apt
1108-
".config/microsoft-edge/*",
1108+
".config/microsoft-edge",
11091109
# Chrome - RHEL/Ubuntu - Flatpak
1110-
".var/app/com.google.Chrome/config/google-chrome/*",
1110+
".var/app/com.google.Chrome/config/google-chrome",
11111111
# Edge - RHEL/Ubuntu - Flatpak
1112-
".var/app/com.microsoft.Edge/config/microsoft-edge/*",
1112+
".var/app/com.microsoft.Edge/config/microsoft-edge",
11131113
# Chromium - RHEL/Ubuntu - Flatpak
1114-
".var/app/org.chromium.Chromium/config/chromium/*",
1114+
".var/app/org.chromium.Chromium/config/chromium",
11151115
# Chrome
1116-
"AppData/Local/Google/Chrom*/User Data/*",
1116+
"AppData/Local/Google/Chrom*/User Data",
11171117
# Edge
1118-
"AppData/Local/Microsoft/Edge/User Data/*",
1119-
"Library/Application Support/Microsoft Edge/*",
1120-
"Local Settings/Application Data/Microsoft/Edge/User Data/*",
1118+
"AppData/Local/Microsoft/Edge/User Data",
1119+
"Library/Application Support/Microsoft Edge",
1120+
"Local Settings/Application Data/Microsoft/Edge/User Data",
11211121
# Chrome - Legacy
1122-
"Library/Application Support/Chromium/*",
1123-
"Library/Application Support/Google/Chrome/*",
1124-
"Local Settings/Application Data/Google/Chrom*/User Data/*",
1122+
"Library/Application Support/Chromium",
1123+
"Library/Application Support/Google/Chrome",
1124+
"Local Settings/Application Data/Google/Chrom*/User Data",
11251125
# Chromium - RHEL/Ubuntu - snap
1126-
"snap/chromium/common/chromium/*",
1126+
"snap/chromium/common/chromium",
11271127
],
1128+
["*", "Snapshots/*/*"],
11281129
[
11291130
"Archived History",
11301131
"Bookmarks",
@@ -1139,6 +1140,7 @@ class History(Module):
11391140
"Login Data",
11401141
"Login Data For Account",
11411142
"Shortcuts",
1143+
"Snapshots",
11421144
"Top Sites",
11431145
"Web Data",
11441146
],
@@ -1189,9 +1191,9 @@ class History(Module):
11891191
@classmethod
11901192
def get_spec_additions(cls, target: Target, cli_args: argparse.Namespace) -> Iterator[tuple]:
11911193
spec = set()
1192-
for root_dirs, history_dirs in cls.COMMON_DIRS.values():
1193-
for root_dir, history_dir in product(root_dirs, history_dirs):
1194-
full_path = f"{root_dir}/{history_dir}"
1194+
for root_dirs, extension_dirs, history_dirs in cls.COMMON_DIRS.values():
1195+
for root_dir, extension_dir, history_dir in product(root_dirs, extension_dirs, history_dirs):
1196+
full_path = f"{root_dir}/{extension_dir}/{history_dir}"
11951197
search_type = "glob" if "*" in full_path else "file"
11961198

11971199
spec.add((search_type, full_path, from_user_home))

0 commit comments

Comments
 (0)