dissect.target 3.21.dev3__py3-none-any.whl → 3.21.dev4__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- dissect/target/plugins/os/unix/trash.py +13 -2
- {dissect.target-3.21.dev3.dist-info → dissect.target-3.21.dev4.dist-info}/METADATA +1 -1
- {dissect.target-3.21.dev3.dist-info → dissect.target-3.21.dev4.dist-info}/RECORD +8 -8
- {dissect.target-3.21.dev3.dist-info → dissect.target-3.21.dev4.dist-info}/COPYRIGHT +0 -0
- {dissect.target-3.21.dev3.dist-info → dissect.target-3.21.dev4.dist-info}/LICENSE +0 -0
- {dissect.target-3.21.dev3.dist-info → dissect.target-3.21.dev4.dist-info}/WHEEL +0 -0
- {dissect.target-3.21.dev3.dist-info → dissect.target-3.21.dev4.dist-info}/entry_points.txt +0 -0
- {dissect.target-3.21.dev3.dist-info → dissect.target-3.21.dev4.dist-info}/top_level.txt +0 -0
@@ -31,15 +31,25 @@ class GnomeTrashPlugin(Plugin):
|
|
31
31
|
|
32
32
|
def __init__(self, target: Target):
|
33
33
|
super().__init__(target)
|
34
|
-
self.trashes =
|
34
|
+
self.trashes = set(self._garbage_collector())
|
35
35
|
|
36
36
|
def _garbage_collector(self) -> Iterator[tuple[UserDetails, TargetPath]]:
|
37
37
|
"""it aint much, but its honest work"""
|
38
|
+
|
39
|
+
# home trash folders
|
38
40
|
for user_details in self.target.user_details.all_with_home():
|
39
41
|
for trash_path in self.PATHS:
|
40
42
|
if (path := user_details.home_path.joinpath(trash_path)).exists():
|
41
43
|
yield user_details, path
|
42
44
|
|
45
|
+
# mounted devices trash folders
|
46
|
+
for mount_path in list(self.target.fs.mounts) + ["/mnt", "/media"]:
|
47
|
+
if mount_path == "/":
|
48
|
+
continue
|
49
|
+
|
50
|
+
for mount_trash in self.target.fs.path(mount_path).rglob(".Trash-*"):
|
51
|
+
yield UserDetails(None, None), mount_trash
|
52
|
+
|
43
53
|
def check_compatible(self) -> None:
|
44
54
|
if not self.trashes:
|
45
55
|
raise UnsupportedPluginError("No Trash folder(s) found")
|
@@ -52,7 +62,8 @@ class GnomeTrashPlugin(Plugin):
|
|
52
62
|
Recovers deleted files and artifacts from ``$HOME/.local/share/Trash``.
|
53
63
|
Probably also works with other desktop interfaces as long as they follow the Trash specification from FreeDesktop.
|
54
64
|
|
55
|
-
|
65
|
+
Also parses media trash locations such as ``/media/$USER/$Label/.Trash-*``, ``/mnt/$Label/.Trash-*`` and other
|
66
|
+
locations as defined in ``/etc/fstab``.
|
56
67
|
|
57
68
|
Resources:
|
58
69
|
- https://specifications.freedesktop.org/trash-spec/latest/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: dissect.target
|
3
|
-
Version: 3.21.
|
3
|
+
Version: 3.21.dev4
|
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
|
@@ -206,7 +206,7 @@ dissect/target/plugins/os/unix/history.py,sha256=95EXJrD5ko7iFLsYhAwvR-2wDbVBSNs
|
|
206
206
|
dissect/target/plugins/os/unix/locale.py,sha256=l42abqG1nGk90SDRt1DmkvqPvO5L-1GtaEwg6dj89qI,4323
|
207
207
|
dissect/target/plugins/os/unix/packagemanager.py,sha256=xmisH9vMY7uR2d6lFVNuWrZrbVnKa6mYk6C3sbcLtlc,1279
|
208
208
|
dissect/target/plugins/os/unix/shadow.py,sha256=TVQQcGhPFYV685ouqOagk4P1AsqAHseFN5lWYHPf3tI,4172
|
209
|
-
dissect/target/plugins/os/unix/trash.py,sha256=
|
209
|
+
dissect/target/plugins/os/unix/trash.py,sha256=7cHY94AxHFh2QbPbDflLkCTQxIlP0XyqJ-DgdMdI4A4,6524
|
210
210
|
dissect/target/plugins/os/unix/bsd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
211
211
|
dissect/target/plugins/os/unix/bsd/_os.py,sha256=e5rttTOFOmd7e2HqP9ZZFMEiPLBr-8rfH0XH1IIeroQ,1372
|
212
212
|
dissect/target/plugins/os/unix/bsd/citrix/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -381,10 +381,10 @@ dissect/target/volumes/luks.py,sha256=OmCMsw6rCUXG1_plnLVLTpsvE1n_6WtoRUGQbpmu1z
|
|
381
381
|
dissect/target/volumes/lvm.py,sha256=wwQVR9I3G9YzmY6UxFsH2Y4MXGBcKL9aayWGCDTiWMU,2269
|
382
382
|
dissect/target/volumes/md.py,sha256=7ShPtusuLGaIv27SvEETtgsuoQyAa4iAAeOR1NEaajI,1689
|
383
383
|
dissect/target/volumes/vmfs.py,sha256=-LoUbn9WNwTtLi_4K34uV_-wDw2W5hgaqxZNj4UmqAQ,1730
|
384
|
-
dissect.target-3.21.
|
385
|
-
dissect.target-3.21.
|
386
|
-
dissect.target-3.21.
|
387
|
-
dissect.target-3.21.
|
388
|
-
dissect.target-3.21.
|
389
|
-
dissect.target-3.21.
|
390
|
-
dissect.target-3.21.
|
384
|
+
dissect.target-3.21.dev4.dist-info/COPYRIGHT,sha256=m-9ih2RVhMiXHI2bf_oNSSgHgkeIvaYRVfKTwFbnJPA,301
|
385
|
+
dissect.target-3.21.dev4.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
386
|
+
dissect.target-3.21.dev4.dist-info/METADATA,sha256=KDxf39pvneyhP8nqpKUAzGXkygiJEIUWWPlNT35kEOE,13186
|
387
|
+
dissect.target-3.21.dev4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
388
|
+
dissect.target-3.21.dev4.dist-info/entry_points.txt,sha256=BWuxAb_6AvUAQpIQOQU0IMTlaF6TDht2AIZK8bHd-zE,492
|
389
|
+
dissect.target-3.21.dev4.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
|
390
|
+
dissect.target-3.21.dev4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|