dissect.target 3.19.dev47__py3-none-any.whl → 3.19.dev49__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 +8 -3
- dissect/target/filesystems/itunes.py +1 -1
- dissect/target/filesystems/tar.py +1 -1
- dissect/target/helpers/fsutil.py +15 -4
- dissect/target/tools/shell.py +15 -0
- {dissect.target-3.19.dev47.dist-info → dissect.target-3.19.dev49.dist-info}/METADATA +1 -1
- {dissect.target-3.19.dev47.dist-info → dissect.target-3.19.dev49.dist-info}/RECORD +12 -12
- {dissect.target-3.19.dev47.dist-info → dissect.target-3.19.dev49.dist-info}/COPYRIGHT +0 -0
- {dissect.target-3.19.dev47.dist-info → dissect.target-3.19.dev49.dist-info}/LICENSE +0 -0
- {dissect.target-3.19.dev47.dist-info → dissect.target-3.19.dev49.dist-info}/WHEEL +0 -0
- {dissect.target-3.19.dev47.dist-info → dissect.target-3.19.dev49.dist-info}/entry_points.txt +0 -0
- {dissect.target-3.19.dev47.dist-info → dissect.target-3.19.dev49.dist-info}/top_level.txt +0 -0
dissect/target/filesystem.py
CHANGED
@@ -753,7 +753,7 @@ class FilesystemEntry:
|
|
753
753
|
"""
|
754
754
|
log.debug("%r::readlink_ext()", self)
|
755
755
|
# Default behavior, resolve link own filesystem.
|
756
|
-
return fsutil.resolve_link(
|
756
|
+
return fsutil.resolve_link(self.fs, self.readlink(), self.path, alt_separator=self.fs.alt_separator)
|
757
757
|
|
758
758
|
def stat(self, follow_symlinks: bool = True) -> fsutil.stat_result:
|
759
759
|
"""Determine the stat information of this entry.
|
@@ -1467,10 +1467,15 @@ class LayerFilesystem(Filesystem):
|
|
1467
1467
|
"""Get a :class:`FilesystemEntry` relative to a specific entry."""
|
1468
1468
|
parts = path.split("/")
|
1469
1469
|
|
1470
|
-
for part in parts:
|
1470
|
+
for i, part in enumerate(parts):
|
1471
1471
|
if entry.is_symlink():
|
1472
1472
|
# Resolve using the RootFilesystem instead of the entry's Filesystem
|
1473
|
-
entry = fsutil.resolve_link(
|
1473
|
+
entry = fsutil.resolve_link(
|
1474
|
+
self,
|
1475
|
+
entry.readlink(),
|
1476
|
+
"/".join(parts[:i]),
|
1477
|
+
alt_separator=entry.fs.alt_separator,
|
1478
|
+
)
|
1474
1479
|
entry = entry.get(part)
|
1475
1480
|
|
1476
1481
|
return entry
|
@@ -94,7 +94,7 @@ class ITunesFilesystemEntry(VirtualFile):
|
|
94
94
|
def readlink_ext(self) -> FilesystemEntry:
|
95
95
|
"""Read the link if this entry is a symlink. Returns a filesystem entry."""
|
96
96
|
# Can't use the one in VirtualFile as it overrides the FilesystemEntry
|
97
|
-
return fsutil.resolve_link(
|
97
|
+
return fsutil.resolve_link(self.fs, self.readlink(), self.path, alt_separator=self.fs.alt_separator)
|
98
98
|
|
99
99
|
def stat(self, follow_symlinks: bool = True) -> fsutil.stat_result:
|
100
100
|
"""Return the stat information of this entry."""
|
@@ -121,7 +121,7 @@ class TarFilesystemEntry(VirtualFile):
|
|
121
121
|
def readlink_ext(self) -> FilesystemEntry:
|
122
122
|
"""Read the link if this entry is a symlink. Returns a filesystem entry."""
|
123
123
|
# Can't use the one in VirtualFile as it overrides the FilesystemEntry
|
124
|
-
return fsutil.resolve_link(
|
124
|
+
return fsutil.resolve_link(self.fs, self.readlink(), self.path, alt_separator=self.fs.alt_separator)
|
125
125
|
|
126
126
|
def stat(self, follow_symlinks: bool = True) -> fsutil.stat_result:
|
127
127
|
"""Return the stat information of this entry."""
|
dissect/target/helpers/fsutil.py
CHANGED
@@ -440,15 +440,20 @@ def has_glob_magic(s) -> bool:
|
|
440
440
|
|
441
441
|
|
442
442
|
def resolve_link(
|
443
|
-
fs: filesystem.Filesystem,
|
443
|
+
fs: filesystem.Filesystem,
|
444
|
+
link: str,
|
445
|
+
path: str,
|
446
|
+
*,
|
447
|
+
alt_separator: str = "",
|
448
|
+
previous_links: set[str] | None = None,
|
444
449
|
) -> filesystem.FilesystemEntry:
|
445
450
|
"""Resolves a symlink to its actual path.
|
446
451
|
|
447
452
|
It stops resolving once it detects an infinite recursion loop.
|
448
453
|
"""
|
449
454
|
|
450
|
-
link = normalize(
|
451
|
-
path = normalize(
|
455
|
+
link = normalize(link, alt_separator=alt_separator)
|
456
|
+
path = normalize(path, alt_separator=alt_separator)
|
452
457
|
|
453
458
|
# Create hash for entry based on path and link
|
454
459
|
link_id = f"{path}{link}"
|
@@ -471,7 +476,13 @@ def resolve_link(
|
|
471
476
|
entry = fs.get(link)
|
472
477
|
|
473
478
|
if entry.is_symlink():
|
474
|
-
entry = resolve_link(
|
479
|
+
entry = resolve_link(
|
480
|
+
fs,
|
481
|
+
entry.readlink(),
|
482
|
+
link,
|
483
|
+
alt_separator=entry.fs.alt_separator,
|
484
|
+
previous_links=previous_links,
|
485
|
+
)
|
475
486
|
|
476
487
|
return entry
|
477
488
|
|
dissect/target/tools/shell.py
CHANGED
@@ -9,6 +9,7 @@ import itertools
|
|
9
9
|
import logging
|
10
10
|
import os
|
11
11
|
import pathlib
|
12
|
+
import platform
|
12
13
|
import pydoc
|
13
14
|
import random
|
14
15
|
import re
|
@@ -1442,6 +1443,20 @@ def main() -> None:
|
|
1442
1443
|
if args.quiet:
|
1443
1444
|
logging.getLogger("dissect").setLevel(level=logging.ERROR)
|
1444
1445
|
|
1446
|
+
# PyPy < 3.10.14 readline is stuck in Python 2.7
|
1447
|
+
if platform.python_implementation() == "PyPy":
|
1448
|
+
major, minor, patch = tuple(map(int, platform.python_version_tuple()))
|
1449
|
+
if major <= 3 and minor <= 10 and patch < 14:
|
1450
|
+
print(
|
1451
|
+
"\n".join(
|
1452
|
+
[
|
1453
|
+
"Note for users of PyPy < 3.10.14:",
|
1454
|
+
"Autocomplete might not work due to an outdated version of pyrepl/readline.py",
|
1455
|
+
"To fix this, please update your version of PyPy.",
|
1456
|
+
]
|
1457
|
+
)
|
1458
|
+
)
|
1459
|
+
|
1445
1460
|
try:
|
1446
1461
|
open_shell(args.targets, args.python, args.registry)
|
1447
1462
|
except TargetError as e:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: dissect.target
|
3
|
-
Version: 3.19.
|
3
|
+
Version: 3.19.dev49
|
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=__p2p72B6mKgIiAOj85EC3ESdZ8gjgkm2pt1KKym3h0,60743
|
5
5
|
dissect/target/loader.py,sha256=I8WNzDA0SMy42F7zfyBcSKj_VKNv64213WUvtGZ77qE,7374
|
6
6
|
dissect/target/plugin.py,sha256=k9xWNnIGQG0DQsq6DKYJ6_DAX1aIA0SjzniWmOwX8O4,50317
|
7
7
|
dissect/target/report.py,sha256=06uiP4MbNI8cWMVrC1SasNS-Yg6ptjVjckwj8Yhe0Js,7958
|
@@ -32,13 +32,13 @@ dissect/target/filesystems/exfat.py,sha256=PRkZPUVN5NlgB1VetFtywdNgF6Yj5OBtF5a25
|
|
32
32
|
dissect/target/filesystems/extfs.py,sha256=pFv1dyqqTnImpMuy-slAqnnLVfteV9tS03AsG-svN9E,4776
|
33
33
|
dissect/target/filesystems/fat.py,sha256=ZSw-wS57vo5eIXJndfI1rZkGu_qh-vyioMzCZFZ_UTE,4611
|
34
34
|
dissect/target/filesystems/ffs.py,sha256=Wu8sS1jjmD0QXXcAaD2h_zzfvinjco8qvj0hErufZ-4,4555
|
35
|
-
dissect/target/filesystems/itunes.py,sha256=
|
35
|
+
dissect/target/filesystems/itunes.py,sha256=w2lcWv6jlBPm84tsGZehxKBMXXyuW3KlmwVTF4ssQec,6395
|
36
36
|
dissect/target/filesystems/jffs.py,sha256=Ceqa5Em2pepnXMH_XZFmSNjQyWPo1uWTthBFSMWfKRo,3926
|
37
37
|
dissect/target/filesystems/ntfs.py,sha256=fGgCKjdO5GrPC21DDr0SwIxmwR7KruNIqGUzysboirA,7068
|
38
38
|
dissect/target/filesystems/overlay.py,sha256=-dqWuMWLcq3usKbJYh0MW-qyp4dfLlOAh2z6FjNPu9I,4314
|
39
39
|
dissect/target/filesystems/smb.py,sha256=uxfcOWwEoDCw8Qpsa94T5Pn-SKd4WXs4OOrzVVI55d8,6406
|
40
40
|
dissect/target/filesystems/squashfs.py,sha256=ehzlThXB7n96XUvQnsK5tWLsA9HIxYN-Zxl7aO9D7ts,3921
|
41
|
-
dissect/target/filesystems/tar.py,sha256=
|
41
|
+
dissect/target/filesystems/tar.py,sha256=EJyvRCU6H7eu0exC0tQggyAZKZ3JFFaihYyx9SIQNqk,5742
|
42
42
|
dissect/target/filesystems/vmfs.py,sha256=sRtYBUAKTKcHrjCXqpFJ8GIVU-ERjqxhB2zXBndtcXU,4955
|
43
43
|
dissect/target/filesystems/vmtar.py,sha256=LlKWkTIuLemQmG9yGqL7980uC_AOL77_GWhbJc_grSk,804
|
44
44
|
dissect/target/filesystems/xfs.py,sha256=kIyFGKYlyFYC7H3jaEv-lNKtBW4ZkD92H0WpfGcr1ww,4498
|
@@ -50,7 +50,7 @@ dissect/target/helpers/configutil.py,sha256=AEnkMQ0e6PncvCqGa-ACzBQWQBhMGBCzO5qz
|
|
50
50
|
dissect/target/helpers/cyber.py,sha256=WnJlk-HqAETmDAgLq92JPxyDLxvzSoFV_WrO-odVKBI,16805
|
51
51
|
dissect/target/helpers/descriptor_extensions.py,sha256=uT8GwznfDAiIgMM7JKKOY0PXKMv2c0GCqJTCkWFgops,2605
|
52
52
|
dissect/target/helpers/docs.py,sha256=J5U65Y3yOTqxDEZRCdrEmO63XQCeDzOJea1PwPM6Cyc,5146
|
53
|
-
dissect/target/helpers/fsutil.py,sha256=
|
53
|
+
dissect/target/helpers/fsutil.py,sha256=y-k8ni04pHMODkgN7clTqdx-3tnFbUr0ubjJEaWOOqY,20504
|
54
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
|
@@ -341,7 +341,7 @@ dissect/target/tools/logging.py,sha256=5ZnumtMWLyslxfrUGZ4ntRyf3obOOhmn8SBjKfdLc
|
|
341
341
|
dissect/target/tools/mount.py,sha256=L_0tSmiBdW4aSaF0vXjB0bAkTC0kmT2N1hrbW6s5Jow,3254
|
342
342
|
dissect/target/tools/query.py,sha256=ONHu2FVomLccikb84qBrlhNmEfRoHYFQMcahk_y2c9A,15580
|
343
343
|
dissect/target/tools/reg.py,sha256=FDsiBBDxjWVUBTRj8xn82vZe-J_d9piM-TKS3PHZCcM,3193
|
344
|
-
dissect/target/tools/shell.py,sha256=
|
344
|
+
dissect/target/tools/shell.py,sha256=dmshIriwdd_UwrdUcTfWkcYD8Z0mjzbDqwyZG-snDdM,50482
|
345
345
|
dissect/target/tools/utils.py,sha256=ej9w2uOzPf52EslEamFpY4Bc_u5EUI9Ks4mU1QTmWPI,11664
|
346
346
|
dissect/target/tools/yara.py,sha256=70k-2VMulf1EdkX03nCACzejaOEcsFHOyX-4E40MdQU,2044
|
347
347
|
dissect/target/tools/dump/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -356,10 +356,10 @@ dissect/target/volumes/luks.py,sha256=OmCMsw6rCUXG1_plnLVLTpsvE1n_6WtoRUGQbpmu1z
|
|
356
356
|
dissect/target/volumes/lvm.py,sha256=wwQVR9I3G9YzmY6UxFsH2Y4MXGBcKL9aayWGCDTiWMU,2269
|
357
357
|
dissect/target/volumes/md.py,sha256=7ShPtusuLGaIv27SvEETtgsuoQyAa4iAAeOR1NEaajI,1689
|
358
358
|
dissect/target/volumes/vmfs.py,sha256=-LoUbn9WNwTtLi_4K34uV_-wDw2W5hgaqxZNj4UmqAQ,1730
|
359
|
-
dissect.target-3.19.
|
360
|
-
dissect.target-3.19.
|
361
|
-
dissect.target-3.19.
|
362
|
-
dissect.target-3.19.
|
363
|
-
dissect.target-3.19.
|
364
|
-
dissect.target-3.19.
|
365
|
-
dissect.target-3.19.
|
359
|
+
dissect.target-3.19.dev49.dist-info/COPYRIGHT,sha256=m-9ih2RVhMiXHI2bf_oNSSgHgkeIvaYRVfKTwFbnJPA,301
|
360
|
+
dissect.target-3.19.dev49.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
361
|
+
dissect.target-3.19.dev49.dist-info/METADATA,sha256=DKL0r0yoBn-ptg_hMmX1gmAfSsompIE45ugWB9TNBg4,12897
|
362
|
+
dissect.target-3.19.dev49.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
|
363
|
+
dissect.target-3.19.dev49.dist-info/entry_points.txt,sha256=BWuxAb_6AvUAQpIQOQU0IMTlaF6TDht2AIZK8bHd-zE,492
|
364
|
+
dissect.target-3.19.dev49.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
|
365
|
+
dissect.target-3.19.dev49.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
{dissect.target-3.19.dev47.dist-info → dissect.target-3.19.dev49.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|