dissect.target 3.20.dev34__py3-none-any.whl → 3.20.dev35__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- dissect/target/helpers/record_modifier.py +5 -1
- dissect/target/target.py +7 -1
- {dissect.target-3.20.dev34.dist-info → dissect.target-3.20.dev35.dist-info}/METADATA +1 -1
- {dissect.target-3.20.dev34.dist-info → dissect.target-3.20.dev35.dist-info}/RECORD +9 -9
- {dissect.target-3.20.dev34.dist-info → dissect.target-3.20.dev35.dist-info}/COPYRIGHT +0 -0
- {dissect.target-3.20.dev34.dist-info → dissect.target-3.20.dev35.dist-info}/LICENSE +0 -0
- {dissect.target-3.20.dev34.dist-info → dissect.target-3.20.dev35.dist-info}/WHEEL +0 -0
- {dissect.target-3.20.dev34.dist-info → dissect.target-3.20.dev35.dist-info}/entry_points.txt +0 -0
- {dissect.target-3.20.dev34.dist-info → dissect.target-3.20.dev35.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,4 @@
|
|
1
|
+
import logging
|
1
2
|
from functools import partial
|
2
3
|
from typing import Callable, Iterable, Iterator
|
3
4
|
|
@@ -95,13 +96,16 @@ def modify_record(target: Target, record: Record, modifier_function: ModifierFun
|
|
95
96
|
try:
|
96
97
|
_record = modifier_function(field_name, resolved_path)
|
97
98
|
except FilesystemError as e:
|
98
|
-
|
99
|
+
level = logging.INFO if isinstance(e, FileNotFoundError) else logging.WARNING
|
100
|
+
target.log.log(
|
101
|
+
level,
|
99
102
|
"Unable to modify record '%s' with function '%s': %s",
|
100
103
|
record._desc.name,
|
101
104
|
modifier_function.__name__,
|
102
105
|
e,
|
103
106
|
)
|
104
107
|
target.log.debug("", exc_info=e)
|
108
|
+
|
105
109
|
else:
|
106
110
|
additional_records.append(_record)
|
107
111
|
|
dissect/target/target.py
CHANGED
@@ -19,6 +19,7 @@ from dissect.target.exceptions import (
|
|
19
19
|
VolumeSystemError,
|
20
20
|
)
|
21
21
|
from dissect.target.helpers import config
|
22
|
+
from dissect.target.helpers.fsutil import TargetPath
|
22
23
|
from dissect.target.helpers.loaderutil import extract_path_info
|
23
24
|
from dissect.target.helpers.record import ChildTargetRecord
|
24
25
|
from dissect.target.helpers.utils import StrEnum, parse_path_uri, slugify
|
@@ -86,8 +87,13 @@ class Target:
|
|
86
87
|
self._errors = []
|
87
88
|
self._applied = False
|
88
89
|
|
90
|
+
# We do not want to look for config files at the Target path if it is actually a child Target.
|
91
|
+
config_paths = [Path.cwd(), Path.home()]
|
92
|
+
if not isinstance(path, TargetPath):
|
93
|
+
config_paths = [self.path] + config_paths
|
94
|
+
|
89
95
|
try:
|
90
|
-
self._config = config.load(
|
96
|
+
self._config = config.load(config_paths)
|
91
97
|
except Exception as e:
|
92
98
|
self.log.warning("Error loading config file: %s", self.path)
|
93
99
|
self.log.debug("", exc_info=e)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: dissect.target
|
3
|
-
Version: 3.20.
|
3
|
+
Version: 3.20.dev35
|
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
|
@@ -5,7 +5,7 @@ dissect/target/filesystem.py,sha256=__p2p72B6mKgIiAOj85EC3ESdZ8gjgkm2pt1KKym3h0,
|
|
5
5
|
dissect/target/loader.py,sha256=11B3W9IpfdTU9GJiKONGffuGeICog7J9ypXZ6mffsBE,7337
|
6
6
|
dissect/target/plugin.py,sha256=xbvmjZMFNwJXZYMBE4KI93-nWL9Zhum8x39ydcO6s2o,50578
|
7
7
|
dissect/target/report.py,sha256=06uiP4MbNI8cWMVrC1SasNS-Yg6ptjVjckwj8Yhe0Js,7958
|
8
|
-
dissect/target/target.py,sha256
|
8
|
+
dissect/target/target.py,sha256=-UoFO_fqS6XPf77RDHSV4gNRi95wwwpgWq7zIhNVUGk,32719
|
9
9
|
dissect/target/volume.py,sha256=aQZAJiny8jjwkc9UtwIRwy7nINXjCxwpO-_UDfh6-BA,15801
|
10
10
|
dissect/target/containers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
dissect/target/containers/asdf.py,sha256=DJp0QEFwUjy2MFwKYcYqIR_BS1fQT1Yi9Kcmqt0aChM,1366
|
@@ -61,7 +61,7 @@ dissect/target/helpers/mui.py,sha256=i-7XoHbu4WO2fYapK9yGAMW04rFlgRispknc1KQIS5Q
|
|
61
61
|
dissect/target/helpers/polypath.py,sha256=h8p7m_OCNiQljGwoZh5Aflr9H2ot6CZr6WKq1OSw58o,2175
|
62
62
|
dissect/target/helpers/protobuf.py,sha256=b4DsnqrRLrefcDjx7rQno-_LBcwtJXxuKf5RdOegzfE,1537
|
63
63
|
dissect/target/helpers/record.py,sha256=7Se6ZV8cvwEaGSjRd9bKhVnUAn4W4KR2eqP6AbQhTH4,5892
|
64
|
-
dissect/target/helpers/record_modifier.py,sha256=
|
64
|
+
dissect/target/helpers/record_modifier.py,sha256=cRNDhUYMmx4iEKyEr5Pqy9xiFgxr_GBNJPp_omkQsEU,4094
|
65
65
|
dissect/target/helpers/regutil.py,sha256=ti-ht2N9UxbMjhUBP2bybY76_dAvbCz0txPBszvSKVw,28171
|
66
66
|
dissect/target/helpers/shell_application_ids.py,sha256=hYxrP-YtHK7ZM0ectJFHfoMB8QUXLbYNKmKXMWLZRlA,38132
|
67
67
|
dissect/target/helpers/shell_folder_ids.py,sha256=Behhb8oh0kMxrEk6YYKYigCDZe8Hw5QS6iK_d2hTs2Y,24978
|
@@ -370,10 +370,10 @@ dissect/target/volumes/luks.py,sha256=OmCMsw6rCUXG1_plnLVLTpsvE1n_6WtoRUGQbpmu1z
|
|
370
370
|
dissect/target/volumes/lvm.py,sha256=wwQVR9I3G9YzmY6UxFsH2Y4MXGBcKL9aayWGCDTiWMU,2269
|
371
371
|
dissect/target/volumes/md.py,sha256=7ShPtusuLGaIv27SvEETtgsuoQyAa4iAAeOR1NEaajI,1689
|
372
372
|
dissect/target/volumes/vmfs.py,sha256=-LoUbn9WNwTtLi_4K34uV_-wDw2W5hgaqxZNj4UmqAQ,1730
|
373
|
-
dissect.target-3.20.
|
374
|
-
dissect.target-3.20.
|
375
|
-
dissect.target-3.20.
|
376
|
-
dissect.target-3.20.
|
377
|
-
dissect.target-3.20.
|
378
|
-
dissect.target-3.20.
|
379
|
-
dissect.target-3.20.
|
373
|
+
dissect.target-3.20.dev35.dist-info/COPYRIGHT,sha256=m-9ih2RVhMiXHI2bf_oNSSgHgkeIvaYRVfKTwFbnJPA,301
|
374
|
+
dissect.target-3.20.dev35.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
375
|
+
dissect.target-3.20.dev35.dist-info/METADATA,sha256=9GgIs5LXTcTHRD-MAebYgSiiOIqYLXAbKkDI6MrSJsg,12897
|
376
|
+
dissect.target-3.20.dev35.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
377
|
+
dissect.target-3.20.dev35.dist-info/entry_points.txt,sha256=BWuxAb_6AvUAQpIQOQU0IMTlaF6TDht2AIZK8bHd-zE,492
|
378
|
+
dissect.target-3.20.dev35.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
|
379
|
+
dissect.target-3.20.dev35.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
{dissect.target-3.20.dev34.dist-info → dissect.target-3.20.dev35.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|