dissect.target 3.19.dev9__py3-none-any.whl → 3.19.dev11__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- dissect/target/plugins/apps/browser/chrome.py +1 -0
- dissect/target/plugins/apps/browser/chromium.py +6 -5
- dissect/target/plugins/apps/browser/edge.py +1 -0
- dissect/target/tools/shell.py +21 -22
- {dissect.target-3.19.dev9.dist-info → dissect.target-3.19.dev11.dist-info}/METADATA +1 -1
- {dissect.target-3.19.dev9.dist-info → dissect.target-3.19.dev11.dist-info}/RECORD +11 -11
- {dissect.target-3.19.dev9.dist-info → dissect.target-3.19.dev11.dist-info}/WHEEL +1 -1
- {dissect.target-3.19.dev9.dist-info → dissect.target-3.19.dev11.dist-info}/COPYRIGHT +0 -0
- {dissect.target-3.19.dev9.dist-info → dissect.target-3.19.dev11.dist-info}/LICENSE +0 -0
- {dissect.target-3.19.dev9.dist-info → dissect.target-3.19.dev11.dist-info}/entry_points.txt +0 -0
- {dissect.target-3.19.dev9.dist-info → dissect.target-3.19.dev11.dist-info}/top_level.txt +0 -0
@@ -25,6 +25,7 @@ class ChromePlugin(ChromiumMixin, BrowserPlugin):
|
|
25
25
|
DIRS = [
|
26
26
|
# Windows
|
27
27
|
"AppData/Local/Google/Chrome/User Data/Default",
|
28
|
+
"AppData/Local/Google/Chrome/User Data/Snapshots/*/Default",
|
28
29
|
"AppData/Local/Google/Chrome/continuousUpdates/User Data/Default",
|
29
30
|
"Local Settings/Application Data/Google/Chrome/User Data/Default",
|
30
31
|
# Linux
|
@@ -79,11 +79,12 @@ class ChromiumMixin:
|
|
79
79
|
users_dirs: list[tuple] = []
|
80
80
|
for user_details in self.target.user_details.all_with_home():
|
81
81
|
for d in hist_paths:
|
82
|
-
|
83
|
-
cur_dir
|
84
|
-
|
85
|
-
|
86
|
-
|
82
|
+
home_dir: TargetPath = user_details.home_path
|
83
|
+
for cur_dir in home_dir.glob(d):
|
84
|
+
cur_dir = cur_dir.resolve()
|
85
|
+
if not cur_dir.exists() or (user_details.user, cur_dir) in users_dirs:
|
86
|
+
continue
|
87
|
+
users_dirs.append((user_details, cur_dir))
|
87
88
|
return users_dirs
|
88
89
|
|
89
90
|
def _iter_db(
|
@@ -28,6 +28,7 @@ class EdgePlugin(ChromiumMixin, BrowserPlugin):
|
|
28
28
|
".var/app/com.microsoft.Edge/config/microsoft-edge/Default",
|
29
29
|
# Windows
|
30
30
|
"AppData/Local/Microsoft/Edge/User Data/Default",
|
31
|
+
"AppData/Local/Microsoft/Edge/User Data/Snapshots/*/Default",
|
31
32
|
# Macos
|
32
33
|
"Library/Application Support/Microsoft Edge/Default",
|
33
34
|
]
|
dissect/target/tools/shell.py
CHANGED
@@ -16,7 +16,6 @@ import shutil
|
|
16
16
|
import stat
|
17
17
|
import subprocess
|
18
18
|
import sys
|
19
|
-
import traceback
|
20
19
|
from contextlib import contextmanager
|
21
20
|
from typing import Any, BinaryIO, Callable, Iterator, Optional, TextIO, Union
|
22
21
|
|
@@ -33,13 +32,15 @@ from dissect.target.exceptions import (
|
|
33
32
|
)
|
34
33
|
from dissect.target.filesystem import FilesystemEntry, LayerFilesystemEntry
|
35
34
|
from dissect.target.helpers import cyber, fsutil, regutil
|
36
|
-
from dissect.target.plugin import arg
|
35
|
+
from dissect.target.plugin import PluginFunction, arg
|
37
36
|
from dissect.target.target import Target
|
38
37
|
from dissect.target.tools.info import print_target_info
|
39
38
|
from dissect.target.tools.utils import (
|
40
39
|
args_to_uri,
|
41
40
|
catch_sigpipe,
|
42
41
|
configure_generic_arguments,
|
42
|
+
execute_function_on_target,
|
43
|
+
find_and_filter_plugins,
|
43
44
|
generate_argparse_for_bound_method,
|
44
45
|
process_generic_arguments,
|
45
46
|
)
|
@@ -114,6 +115,7 @@ class TargetCmd(cmd.Cmd):
|
|
114
115
|
cmd.Cmd.__init__(self)
|
115
116
|
self.target = target
|
116
117
|
self.debug = False
|
118
|
+
self.identchars += "."
|
117
119
|
|
118
120
|
def __getattr__(self, attr: str) -> Any:
|
119
121
|
if attr.startswith("help_"):
|
@@ -154,8 +156,8 @@ class TargetCmd(cmd.Cmd):
|
|
154
156
|
except AttributeError:
|
155
157
|
pass
|
156
158
|
|
157
|
-
if self.target
|
158
|
-
return self._exec_target(
|
159
|
+
if plugins := list(find_and_filter_plugins(self.target, command, [])):
|
160
|
+
return self._exec_target(plugins, command_args_str)
|
159
161
|
|
160
162
|
return cmd.Cmd.default(self, line)
|
161
163
|
|
@@ -213,24 +215,15 @@ class TargetCmd(cmd.Cmd):
|
|
213
215
|
no_cyber = cmdfunc.__func__ in (TargetCli.cmd_registry, TargetCli.cmd_enter)
|
214
216
|
return self._exec(_exec_, command_args_str, no_cyber)
|
215
217
|
|
216
|
-
def _exec_target(self,
|
218
|
+
def _exec_target(self, funcs: list[PluginFunction], command_args_str: str) -> Optional[bool]:
|
217
219
|
"""Command exection helper for target plugins."""
|
218
|
-
attr = self.target
|
219
|
-
for part in func.split("."):
|
220
|
-
attr = getattr(attr, part)
|
221
220
|
|
222
221
|
def _exec_(argparts: list[str], stdout: TextIO) -> Optional[bool]:
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
except SystemExit:
|
228
|
-
return False
|
229
|
-
value = attr(**vars(args))
|
230
|
-
else:
|
231
|
-
value = attr
|
222
|
+
try:
|
223
|
+
output, value, _ = execute_function_on_target(self.target, func, argparts)
|
224
|
+
except SystemExit:
|
225
|
+
return False
|
232
226
|
|
233
|
-
output = getattr(attr, "__output__", "default")
|
234
227
|
if output == "record":
|
235
228
|
# if the command results are piped to another process,
|
236
229
|
# the process will receive Record objects
|
@@ -251,10 +244,16 @@ class TargetCmd(cmd.Cmd):
|
|
251
244
|
else:
|
252
245
|
print(value, file=stdout)
|
253
246
|
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
247
|
+
result = None
|
248
|
+
for func in funcs:
|
249
|
+
try:
|
250
|
+
result = self._exec(_exec_, command_args_str)
|
251
|
+
except PluginError as err:
|
252
|
+
if self.debug:
|
253
|
+
raise err
|
254
|
+
self.target.log.error(err)
|
255
|
+
|
256
|
+
return result
|
258
257
|
|
259
258
|
def do_python(self, line: str) -> Optional[bool]:
|
260
259
|
"""drop into a Python shell"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: dissect.target
|
3
|
-
Version: 3.19.
|
3
|
+
Version: 3.19.dev11
|
4
4
|
Summary: This module ties all other Dissect modules together, it provides a programming API and command line tools which allow easy access to various data sources inside disk images or file collections (a.k.a. targets)
|
5
5
|
Author-email: Dissect Team <dissect@fox-it.com>
|
6
6
|
License: Affero General Public License v3
|
@@ -121,9 +121,9 @@ dissect/target/plugins/apps/av/trendmicro.py,sha256=8F4IWYCXG7HEniGridQ4ax82Mrx_
|
|
121
121
|
dissect/target/plugins/apps/browser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
122
122
|
dissect/target/plugins/apps/browser/brave.py,sha256=EW1ubL10swHeV9CscfpE-SrNZozul_Ewj48LNRaG5Kg,2865
|
123
123
|
dissect/target/plugins/apps/browser/browser.py,sha256=rBIwcgdl73gm-8APwx2jEUAYXRniXkqcdMr2UYj_tS8,4118
|
124
|
-
dissect/target/plugins/apps/browser/chrome.py,sha256=
|
125
|
-
dissect/target/plugins/apps/browser/chromium.py,sha256=
|
126
|
-
dissect/target/plugins/apps/browser/edge.py,sha256=
|
124
|
+
dissect/target/plugins/apps/browser/chrome.py,sha256=DMONTYE95sI_jcmyQOapHwWQWwrezfYMllVCCPwhEP0,3117
|
125
|
+
dissect/target/plugins/apps/browser/chromium.py,sha256=QOeWSSXFM1IbUh3PMUB14oy6sqAS_v2B3xhthAMM_8k,28058
|
126
|
+
dissect/target/plugins/apps/browser/edge.py,sha256=tuuIbm4s8nNstA6nIOEfU0LG0jt20a8gf3rve2SXtdM,2953
|
127
127
|
dissect/target/plugins/apps/browser/firefox.py,sha256=3Ucp85DXTDyCofW1_aEzjba_Pr0QyC4F5gX8NqY-uOg,30981
|
128
128
|
dissect/target/plugins/apps/browser/iexplore.py,sha256=g_xw0toaiyjevxO8g9XPCOqc-CXZp39FVquRhPFGdTE,8801
|
129
129
|
dissect/target/plugins/apps/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -331,7 +331,7 @@ dissect/target/tools/logging.py,sha256=5ZnumtMWLyslxfrUGZ4ntRyf3obOOhmn8SBjKfdLc
|
|
331
331
|
dissect/target/tools/mount.py,sha256=L_0tSmiBdW4aSaF0vXjB0bAkTC0kmT2N1hrbW6s5Jow,3254
|
332
332
|
dissect/target/tools/query.py,sha256=ONHu2FVomLccikb84qBrlhNmEfRoHYFQMcahk_y2c9A,15580
|
333
333
|
dissect/target/tools/reg.py,sha256=FDsiBBDxjWVUBTRj8xn82vZe-J_d9piM-TKS3PHZCcM,3193
|
334
|
-
dissect/target/tools/shell.py,sha256=
|
334
|
+
dissect/target/tools/shell.py,sha256=_widEuIRqZhYzcFR52NYI8O2aPFm6tG5Uiv-AIrC32U,45155
|
335
335
|
dissect/target/tools/utils.py,sha256=sQizexY3ui5vmWw4KOBLg5ecK3TPFjD-uxDqRn56ZTY,11304
|
336
336
|
dissect/target/tools/dump/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
337
337
|
dissect/target/tools/dump/run.py,sha256=aD84peRS4zHqC78fH7Vd4ni3m1ZmVP70LyMwBRvoDGY,9463
|
@@ -345,10 +345,10 @@ dissect/target/volumes/luks.py,sha256=OmCMsw6rCUXG1_plnLVLTpsvE1n_6WtoRUGQbpmu1z
|
|
345
345
|
dissect/target/volumes/lvm.py,sha256=wwQVR9I3G9YzmY6UxFsH2Y4MXGBcKL9aayWGCDTiWMU,2269
|
346
346
|
dissect/target/volumes/md.py,sha256=j1K1iKmspl0C_OJFc7-Q1BMWN2OCC5EVANIgVlJ_fIE,1673
|
347
347
|
dissect/target/volumes/vmfs.py,sha256=-LoUbn9WNwTtLi_4K34uV_-wDw2W5hgaqxZNj4UmqAQ,1730
|
348
|
-
dissect.target-3.19.
|
349
|
-
dissect.target-3.19.
|
350
|
-
dissect.target-3.19.
|
351
|
-
dissect.target-3.19.
|
352
|
-
dissect.target-3.19.
|
353
|
-
dissect.target-3.19.
|
354
|
-
dissect.target-3.19.
|
348
|
+
dissect.target-3.19.dev11.dist-info/COPYRIGHT,sha256=m-9ih2RVhMiXHI2bf_oNSSgHgkeIvaYRVfKTwFbnJPA,301
|
349
|
+
dissect.target-3.19.dev11.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
350
|
+
dissect.target-3.19.dev11.dist-info/METADATA,sha256=K__-QEn5j-2bVryeNdtzhb6et_uhqklZ7KSWkBT33pM,12719
|
351
|
+
dissect.target-3.19.dev11.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
|
352
|
+
dissect.target-3.19.dev11.dist-info/entry_points.txt,sha256=tvFPa-Ap-gakjaPwRc6Fl6mxHzxEZ_arAVU-IUYeo_s,447
|
353
|
+
dissect.target-3.19.dev11.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
|
354
|
+
dissect.target-3.19.dev11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|