dissect.target 3.18.dev8__py3-none-any.whl → 3.18.dev9__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/filesystem.py +0 -10
- dissect/target/helpers/hashutil.py +0 -40
- {dissect.target-3.18.dev8.dist-info → dissect.target-3.18.dev9.dist-info}/METADATA +1 -1
- {dissect.target-3.18.dev8.dist-info → dissect.target-3.18.dev9.dist-info}/RECORD +9 -9
- {dissect.target-3.18.dev8.dist-info → dissect.target-3.18.dev9.dist-info}/COPYRIGHT +0 -0
- {dissect.target-3.18.dev8.dist-info → dissect.target-3.18.dev9.dist-info}/LICENSE +0 -0
- {dissect.target-3.18.dev8.dist-info → dissect.target-3.18.dev9.dist-info}/WHEEL +0 -0
- {dissect.target-3.18.dev8.dist-info → dissect.target-3.18.dev9.dist-info}/entry_points.txt +0 -0
- {dissect.target-3.18.dev8.dist-info → dissect.target-3.18.dev9.dist-info}/top_level.txt +0 -0
dissect/target/filesystem.py
CHANGED
@@ -6,7 +6,6 @@ import logging
|
|
6
6
|
import os
|
7
7
|
import pathlib
|
8
8
|
import stat
|
9
|
-
import warnings
|
10
9
|
from collections import defaultdict
|
11
10
|
from typing import TYPE_CHECKING, Any, BinaryIO, Callable, Iterator, Optional, Type
|
12
11
|
|
@@ -67,15 +66,6 @@ class Filesystem:
|
|
67
66
|
def __repr__(self) -> str:
|
68
67
|
return f"<{self.__class__.__name__}>"
|
69
68
|
|
70
|
-
@classmethod
|
71
|
-
@property
|
72
|
-
def __fstype__(cls) -> str:
|
73
|
-
warnings.warn(
|
74
|
-
"The __fstype__ attribute is deprecated and will be removed in dissect.target 3.15. Use __type__ instead",
|
75
|
-
category=DeprecationWarning,
|
76
|
-
)
|
77
|
-
return cls.__type__
|
78
|
-
|
79
69
|
def path(self, *args) -> fsutil.TargetPath:
|
80
70
|
"""Instantiate a new path-like object on this filesystem."""
|
81
71
|
return fsutil.TargetPath(self, *args)
|
@@ -1,18 +1,11 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
3
|
import hashlib
|
4
|
-
import warnings
|
5
4
|
from typing import TYPE_CHECKING, BinaryIO, Union
|
6
5
|
|
7
|
-
from flow.record import Record
|
8
|
-
|
9
|
-
from dissect.target.exceptions import FileNotFoundError
|
10
|
-
|
11
6
|
if TYPE_CHECKING:
|
12
7
|
from hashlib._hashlib import HASH
|
13
8
|
|
14
|
-
from dissect.target.target import Target
|
15
|
-
|
16
9
|
BUFFER_SIZE = 32768
|
17
10
|
|
18
11
|
|
@@ -52,36 +45,3 @@ def custom(fh: BinaryIO, algos: list[Union[str, HASH]]) -> tuple[str]:
|
|
52
45
|
ctx = algos
|
53
46
|
|
54
47
|
return _hash(fh, ctx)
|
55
|
-
|
56
|
-
|
57
|
-
def hash_uri(target: Target, path: str) -> tuple[str, str]:
|
58
|
-
"""Hash the target path."""
|
59
|
-
warnings.warn(
|
60
|
-
(
|
61
|
-
"The hash_uri() function is deprecated, and will be removed in dissect.target 3.15. "
|
62
|
-
"Use target.fs.hash() instead"
|
63
|
-
),
|
64
|
-
DeprecationWarning,
|
65
|
-
)
|
66
|
-
|
67
|
-
if path is None:
|
68
|
-
raise FileNotFoundError()
|
69
|
-
|
70
|
-
path = str(target.resolve(path))
|
71
|
-
return (path, target.fs.hash(path))
|
72
|
-
|
73
|
-
|
74
|
-
def hash_uri_records(target: Target, record: Record) -> Record:
|
75
|
-
"""Hash uri paths inside the record."""
|
76
|
-
|
77
|
-
from dissect.target.helpers.record_modifier import Modifier, get_modifier_function
|
78
|
-
|
79
|
-
warnings.warn(
|
80
|
-
(
|
81
|
-
"The hash_uri_records() function is deprecated, and will be removed in dissect.target 3.15. "
|
82
|
-
"Use hash_path_records() instead"
|
83
|
-
),
|
84
|
-
DeprecationWarning,
|
85
|
-
)
|
86
|
-
func = get_modifier_function(Modifier.HASH)
|
87
|
-
return func(target, record)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: dissect.target
|
3
|
-
Version: 3.18.
|
3
|
+
Version: 3.18.dev9
|
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
|
@@ -1,7 +1,7 @@
|
|
1
1
|
dissect/target/__init__.py,sha256=Oc7ounTgq2hE4nR6YcNabetc7SQA40ldSa35VEdZcQU,63
|
2
2
|
dissect/target/container.py,sha256=0YcwcGmfJjhPXUB6DEcjWEoSuAtTDxMDpoTviMrLsxM,9353
|
3
3
|
dissect/target/exceptions.py,sha256=ULi7NXlqju_d8KENEL3aimmfKTFfbNssfeWhAnOB654,2972
|
4
|
-
dissect/target/filesystem.py,sha256=
|
4
|
+
dissect/target/filesystem.py,sha256=G1gbOUpnQZyovubYGEUKgaDV0eHH5vE83-0gTc5PZAM,59793
|
5
5
|
dissect/target/loader.py,sha256=hjKInZAEcv43RiqxZJ0yBI4Y2YZ2-nrsKWu_BKrgba4,7336
|
6
6
|
dissect/target/plugin.py,sha256=HAN8maaDt-Rlqt8Rr1IW7gXQpzNQZjCVz-i4aSPphSw,48677
|
7
7
|
dissect/target/report.py,sha256=06uiP4MbNI8cWMVrC1SasNS-Yg6ptjVjckwj8Yhe0Js,7958
|
@@ -51,7 +51,7 @@ dissect/target/helpers/cyber.py,sha256=Ki5oSU0GgQxjgC_yWoeieGP7GOY5blQCzNX7vy7Pg
|
|
51
51
|
dissect/target/helpers/descriptor_extensions.py,sha256=uT8GwznfDAiIgMM7JKKOY0PXKMv2c0GCqJTCkWFgops,2605
|
52
52
|
dissect/target/helpers/docs.py,sha256=J5U65Y3yOTqxDEZRCdrEmO63XQCeDzOJea1PwPM6Cyc,5146
|
53
53
|
dissect/target/helpers/fsutil.py,sha256=tPyH4RBDqM9QXjamIQaDRLUy3b4dKmfrT6k3ZP01U6Y,19772
|
54
|
-
dissect/target/helpers/hashutil.py,sha256=
|
54
|
+
dissect/target/helpers/hashutil.py,sha256=bYAGEjyYyxuCTziO4kCx6srzY1Cm-PXmayRRcxt5ca4,1061
|
55
55
|
dissect/target/helpers/keychain.py,sha256=wYH0sf7eaxP0bZTo80RF_BQMWulCWmIQ8Tzt9K5TSNQ,3611
|
56
56
|
dissect/target/helpers/lazy.py,sha256=823VtmdWsbJyVZvNWopDhQdqq2i1xtj6b8IKfveboKw,1771
|
57
57
|
dissect/target/helpers/loaderutil.py,sha256=kiyMWra_gVxfNSGwLlgxLcuuqAYuCMDc5NiCDprVNnc,2649
|
@@ -340,10 +340,10 @@ dissect/target/volumes/luks.py,sha256=OmCMsw6rCUXG1_plnLVLTpsvE1n_6WtoRUGQbpmu1z
|
|
340
340
|
dissect/target/volumes/lvm.py,sha256=wwQVR9I3G9YzmY6UxFsH2Y4MXGBcKL9aayWGCDTiWMU,2269
|
341
341
|
dissect/target/volumes/md.py,sha256=j1K1iKmspl0C_OJFc7-Q1BMWN2OCC5EVANIgVlJ_fIE,1673
|
342
342
|
dissect/target/volumes/vmfs.py,sha256=-LoUbn9WNwTtLi_4K34uV_-wDw2W5hgaqxZNj4UmqAQ,1730
|
343
|
-
dissect.target-3.18.
|
344
|
-
dissect.target-3.18.
|
345
|
-
dissect.target-3.18.
|
346
|
-
dissect.target-3.18.
|
347
|
-
dissect.target-3.18.
|
348
|
-
dissect.target-3.18.
|
349
|
-
dissect.target-3.18.
|
343
|
+
dissect.target-3.18.dev9.dist-info/COPYRIGHT,sha256=m-9ih2RVhMiXHI2bf_oNSSgHgkeIvaYRVfKTwFbnJPA,301
|
344
|
+
dissect.target-3.18.dev9.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
345
|
+
dissect.target-3.18.dev9.dist-info/METADATA,sha256=MhwBgTsOJRxjOgDeAphefB5vGoY0YAaydMIelDhkiRE,12722
|
346
|
+
dissect.target-3.18.dev9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
347
|
+
dissect.target-3.18.dev9.dist-info/entry_points.txt,sha256=tvFPa-Ap-gakjaPwRc6Fl6mxHzxEZ_arAVU-IUYeo_s,447
|
348
|
+
dissect.target-3.18.dev9.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
|
349
|
+
dissect.target-3.18.dev9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|