dissect.target 3.17.dev8__py3-none-any.whl → 3.17.dev10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dissect/target/helpers/configutil.py +24 -1
- {dissect.target-3.17.dev8.dist-info → dissect.target-3.17.dev10.dist-info}/METADATA +2 -1
- {dissect.target-3.17.dev8.dist-info → dissect.target-3.17.dev10.dist-info}/RECORD +8 -8
- {dissect.target-3.17.dev8.dist-info → dissect.target-3.17.dev10.dist-info}/COPYRIGHT +0 -0
- {dissect.target-3.17.dev8.dist-info → dissect.target-3.17.dev10.dist-info}/LICENSE +0 -0
- {dissect.target-3.17.dev8.dist-info → dissect.target-3.17.dev10.dist-info}/WHEEL +0 -0
- {dissect.target-3.17.dev8.dist-info → dissect.target-3.17.dev10.dist-info}/entry_points.txt +0 -0
- {dissect.target-3.17.dev8.dist-info → dissect.target-3.17.dev10.dist-info}/top_level.txt +0 -0
@@ -3,6 +3,7 @@ from __future__ import annotations
|
|
3
3
|
import io
|
4
4
|
import json
|
5
5
|
import re
|
6
|
+
import sys
|
6
7
|
from collections import deque
|
7
8
|
from configparser import ConfigParser, MissingSectionHeaderError
|
8
9
|
from dataclasses import dataclass
|
@@ -31,9 +32,20 @@ try:
|
|
31
32
|
import yaml
|
32
33
|
|
33
34
|
PY_YAML = True
|
34
|
-
except
|
35
|
+
except ImportError:
|
35
36
|
PY_YAML = False
|
36
37
|
|
38
|
+
try:
|
39
|
+
if sys.version_info < (3, 11):
|
40
|
+
import tomli as toml
|
41
|
+
else:
|
42
|
+
# tomllib is included since python 3.11
|
43
|
+
import tomllib as toml # novermin
|
44
|
+
|
45
|
+
HAS_TOML = True
|
46
|
+
except ImportError:
|
47
|
+
HAS_TOML = False
|
48
|
+
|
37
49
|
|
38
50
|
def _update_dictionary(current: dict[str, Any], key: str, value: Any) -> None:
|
39
51
|
if prev_value := current.get(key):
|
@@ -408,6 +420,16 @@ class Yaml(ConfigurationParser):
|
|
408
420
|
raise ConfigurationParsingError("Failed to parse file, please install PyYAML.")
|
409
421
|
|
410
422
|
|
423
|
+
class Toml(ConfigurationParser):
|
424
|
+
"""Parses a Toml file."""
|
425
|
+
|
426
|
+
def parse_file(self, fh: TextIO) -> None:
|
427
|
+
if HAS_TOML:
|
428
|
+
self.parsed_data = toml.loads(fh.read())
|
429
|
+
else:
|
430
|
+
raise ConfigurationParsingError("Failed to parse file, please install tomli.")
|
431
|
+
|
432
|
+
|
411
433
|
class ScopeManager:
|
412
434
|
"""A (context)manager for dictionary scoping.
|
413
435
|
|
@@ -696,6 +718,7 @@ CONFIG_MAP: dict[tuple[str, ...], ParserConfig] = {
|
|
696
718
|
"sample": ParserConfig(Txt),
|
697
719
|
"systemd": ParserConfig(SystemD),
|
698
720
|
"template": ParserConfig(Txt),
|
721
|
+
"toml": ParserConfig(Toml),
|
699
722
|
}
|
700
723
|
|
701
724
|
KNOWN_FILES: dict[str, type[ConfigurationParser]] = {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: dissect.target
|
3
|
-
Version: 3.17.
|
3
|
+
Version: 3.17.dev10
|
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
|
@@ -58,6 +58,7 @@ Requires-Dist: fusepy ; extra == 'full'
|
|
58
58
|
Requires-Dist: pycryptodome ; extra == 'full'
|
59
59
|
Requires-Dist: pyyaml ; extra == 'full'
|
60
60
|
Requires-Dist: zstandard ; extra == 'full'
|
61
|
+
Requires-Dist: tomli ; (python_version < "3.11") and extra == 'full'
|
61
62
|
Provides-Extra: mqtt
|
62
63
|
Requires-Dist: dissect.target[full] ; extra == 'mqtt'
|
63
64
|
Requires-Dist: paho-mqtt ==1.6.1 ; extra == 'mqtt'
|
@@ -44,7 +44,7 @@ dissect/target/filesystems/zip.py,sha256=WT1bQhzX_1MXXVZTKrJniae4xqRqMZ8FsfbvhgG
|
|
44
44
|
dissect/target/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
45
45
|
dissect/target/helpers/cache.py,sha256=_0w_iPD1OM066Ueyadb70erQW05jNnpJe-bDDN1UyXc,8444
|
46
46
|
dissect/target/helpers/config.py,sha256=6917CZ6eDHaK_tOoiVEIndyhRXO6r6eCBIleq6f47PQ,2346
|
47
|
-
dissect/target/helpers/configutil.py,sha256=
|
47
|
+
dissect/target/helpers/configutil.py,sha256=czuzKdcV7O6OZopDv3Olr00uGbBAXxEnm0QLX_xIj8g,25617
|
48
48
|
dissect/target/helpers/cyber.py,sha256=Ki5oSU0GgQxjgC_yWoeieGP7GOY5blQCzNX7vy7Pgas,16782
|
49
49
|
dissect/target/helpers/descriptor_extensions.py,sha256=uT8GwznfDAiIgMM7JKKOY0PXKMv2c0GCqJTCkWFgops,2605
|
50
50
|
dissect/target/helpers/docs.py,sha256=J5U65Y3yOTqxDEZRCdrEmO63XQCeDzOJea1PwPM6Cyc,5146
|
@@ -336,10 +336,10 @@ dissect/target/volumes/luks.py,sha256=OmCMsw6rCUXG1_plnLVLTpsvE1n_6WtoRUGQbpmu1z
|
|
336
336
|
dissect/target/volumes/lvm.py,sha256=wwQVR9I3G9YzmY6UxFsH2Y4MXGBcKL9aayWGCDTiWMU,2269
|
337
337
|
dissect/target/volumes/md.py,sha256=j1K1iKmspl0C_OJFc7-Q1BMWN2OCC5EVANIgVlJ_fIE,1673
|
338
338
|
dissect/target/volumes/vmfs.py,sha256=-LoUbn9WNwTtLi_4K34uV_-wDw2W5hgaqxZNj4UmqAQ,1730
|
339
|
-
dissect.target-3.17.
|
340
|
-
dissect.target-3.17.
|
341
|
-
dissect.target-3.17.
|
342
|
-
dissect.target-3.17.
|
343
|
-
dissect.target-3.17.
|
344
|
-
dissect.target-3.17.
|
345
|
-
dissect.target-3.17.
|
339
|
+
dissect.target-3.17.dev10.dist-info/COPYRIGHT,sha256=m-9ih2RVhMiXHI2bf_oNSSgHgkeIvaYRVfKTwFbnJPA,301
|
340
|
+
dissect.target-3.17.dev10.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
341
|
+
dissect.target-3.17.dev10.dist-info/METADATA,sha256=VF_8EEQVRLeEGycmdTbNEAx1oK0fC-YMDwS2aex6FNY,11295
|
342
|
+
dissect.target-3.17.dev10.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
343
|
+
dissect.target-3.17.dev10.dist-info/entry_points.txt,sha256=tvFPa-Ap-gakjaPwRc6Fl6mxHzxEZ_arAVU-IUYeo_s,447
|
344
|
+
dissect.target-3.17.dev10.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
|
345
|
+
dissect.target-3.17.dev10.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|