dissect.target 3.21.dev2__py3-none-any.whl → 3.21.dev3__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  import fnmatch
2
4
  import re
3
5
  from pathlib import Path
@@ -30,9 +32,10 @@ class EtcTree(ConfigurationTreePlugin):
30
32
  def __init__(self, target: Target):
31
33
  super().__init__(target, "/etc")
32
34
 
33
- def _sub(self, items: ConfigurationEntry, entry: Path, pattern: str) -> Iterator[UnixConfigTreeRecord]:
35
+ def _sub(
36
+ self, items: ConfigurationEntry | dict, entry: Path, orig_path: Path, pattern: str
37
+ ) -> Iterator[UnixConfigTreeRecord]:
34
38
  index = 0
35
- config_entry = items
36
39
  if not isinstance(items, dict):
37
40
  items = items.as_dict()
38
41
 
@@ -41,7 +44,7 @@ class EtcTree(ConfigurationTreePlugin):
41
44
  path = Path(entry) / Path(key)
42
45
 
43
46
  if isinstance(value, dict):
44
- yield from self._sub(value, path, pattern)
47
+ yield from self._sub(value, path, orig_path, pattern)
45
48
  continue
46
49
 
47
50
  if not isinstance(value, list):
@@ -50,7 +53,7 @@ class EtcTree(ConfigurationTreePlugin):
50
53
  if fnmatch.fnmatch(path, pattern):
51
54
  data = {
52
55
  "_target": self.target,
53
- "source": self.target.fs.path(config_entry.entry.path),
56
+ "source": self.target.fs.path(orig_path),
54
57
  "path": path,
55
58
  "key": key,
56
59
  "value": value,
@@ -71,8 +74,11 @@ class EtcTree(ConfigurationTreePlugin):
71
74
  for entry, subs, items in self.config_fs.walk(root):
72
75
  for item in items:
73
76
  try:
74
- config_object = self.get(str(Path(entry) / Path(item)))
75
- yield from self._sub(config_object, Path(entry) / Path(item), pattern)
77
+ path = Path(entry) / item
78
+ config_object = self.get(str(path))
79
+
80
+ if isinstance(config_object, ConfigurationEntry):
81
+ yield from self._sub(config_object, path, orig_path=path, pattern=pattern)
76
82
  except Exception:
77
83
  self.target.log.warning("Could not open configuration item: %s", item)
78
84
  pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dissect.target
3
- Version: 3.21.dev2
3
+ Version: 3.21.dev3
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
@@ -23,81 +23,81 @@ Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
24
  License-File: COPYRIGHT
25
25
  Requires-Dist: defusedxml
26
- Requires-Dist: dissect.cstruct <5,>=4
27
- Requires-Dist: dissect.eventlog <4,>=3
28
- Requires-Dist: dissect.evidence <4,>=3
29
- Requires-Dist: dissect.hypervisor <4,>=3
30
- Requires-Dist: dissect.ntfs <4,>=3.4
31
- Requires-Dist: dissect.regf <4,>=3.3
32
- Requires-Dist: dissect.util <4,>=3
33
- Requires-Dist: dissect.volume <4,>=2
34
- Requires-Dist: flow.record ~=3.18.0
26
+ Requires-Dist: dissect.cstruct<5,>=4
27
+ Requires-Dist: dissect.eventlog<4,>=3
28
+ Requires-Dist: dissect.evidence<4,>=3
29
+ Requires-Dist: dissect.hypervisor<4,>=3
30
+ Requires-Dist: dissect.ntfs<4,>=3.4
31
+ Requires-Dist: dissect.regf<4,>=3.3
32
+ Requires-Dist: dissect.util<4,>=3
33
+ Requires-Dist: dissect.volume<4,>=2
34
+ Requires-Dist: flow.record~=3.18.0
35
35
  Requires-Dist: structlog
36
- Provides-Extra: cb
37
- Requires-Dist: dissect.target[full] ; extra == 'cb'
38
- Requires-Dist: carbon-black-cloud-sdk ~=1.4.3 ; extra == 'cb'
39
- Provides-Extra: dev
40
- Requires-Dist: dissect.target[full,mqtt,yara] ; extra == 'dev'
41
- Requires-Dist: dissect.archive[dev] <2.0.dev,>=1.0.dev ; extra == 'dev'
42
- Requires-Dist: dissect.btrfs[dev] <2.0.dev,>=1.0.dev ; extra == 'dev'
43
- Requires-Dist: dissect.cim[dev] <4.0.dev,>=3.0.dev ; extra == 'dev'
44
- Requires-Dist: dissect.clfs[dev] <2.0.dev,>=1.0.dev ; extra == 'dev'
45
- Requires-Dist: dissect.cstruct <5.0.dev,>=4.0.dev ; extra == 'dev'
46
- Requires-Dist: dissect.esedb[dev] <4.0.dev,>=3.0.dev ; extra == 'dev'
47
- Requires-Dist: dissect.etl[dev] <4.0.dev,>=3.0.dev ; extra == 'dev'
48
- Requires-Dist: dissect.eventlog[dev] <4.0.dev,>=3.0.dev ; extra == 'dev'
49
- Requires-Dist: dissect.evidence[dev] <4.0.dev,>=3.0.dev ; extra == 'dev'
50
- Requires-Dist: dissect.extfs[dev] <4.0.dev,>=3.0.dev ; extra == 'dev'
51
- Requires-Dist: dissect.fat[dev] <4.0.dev,>=3.0.dev ; extra == 'dev'
52
- Requires-Dist: dissect.ffs[dev] <4.0.dev,>=3.0.dev ; extra == 'dev'
53
- Requires-Dist: dissect.hypervisor[dev] <4.0.dev,>=3.0.dev ; extra == 'dev'
54
- Requires-Dist: dissect.jffs[dev] <2.0.dev,>=1.0.dev ; extra == 'dev'
55
- Requires-Dist: dissect.ntfs[dev] <4.0.dev,>=3.4.dev ; extra == 'dev'
56
- Requires-Dist: dissect.regf[dev] <4.0.dev,>=3.3.dev ; extra == 'dev'
57
- Requires-Dist: dissect.shellitem[dev] <4.0.dev,>=3.0.dev ; extra == 'dev'
58
- Requires-Dist: dissect.sql[dev] <4.0.dev,>=3.0.dev ; extra == 'dev'
59
- Requires-Dist: dissect.squashfs[dev] <2.0.dev,>=1.0.dev ; extra == 'dev'
60
- Requires-Dist: dissect.thumbcache[dev] <2.0.dev,>=1.0.dev ; extra == 'dev'
61
- Requires-Dist: dissect.util <4.0.dev,>=3.0.dev ; extra == 'dev'
62
- Requires-Dist: dissect.vmfs[dev] <4.0.dev,>=3.0.dev ; extra == 'dev'
63
- Requires-Dist: dissect.volume[dev] <4.0.dev,>=3.0.dev ; extra == 'dev'
64
- Requires-Dist: dissect.xfs[dev] <4.0.dev,>=3.0.dev ; extra == 'dev'
65
- Requires-Dist: dissect.fve[dev] <5.0.dev,>=4.0.dev ; (platform_system != "Windows" or platform_python_implementation != "PyPy") and extra == 'dev'
66
36
  Provides-Extra: full
67
- Requires-Dist: asn1crypto ; extra == 'full'
68
- Requires-Dist: dissect.archive <2,>=1 ; extra == 'full'
69
- Requires-Dist: dissect.btrfs <2,>=1 ; extra == 'full'
70
- Requires-Dist: dissect.cim <4,>=3 ; extra == 'full'
71
- Requires-Dist: dissect.clfs <2,>=1 ; extra == 'full'
72
- Requires-Dist: dissect.esedb <4,>=3 ; extra == 'full'
73
- Requires-Dist: dissect.etl <4,>=3 ; extra == 'full'
74
- Requires-Dist: dissect.extfs <4,>=3 ; extra == 'full'
75
- Requires-Dist: dissect.fat <4,>=3 ; extra == 'full'
76
- Requires-Dist: dissect.ffs <4,>=3 ; extra == 'full'
77
- Requires-Dist: dissect.jffs <2,>=1 ; extra == 'full'
78
- Requires-Dist: dissect.ole <4,>=3 ; extra == 'full'
79
- Requires-Dist: dissect.shellitem <4,>=3 ; extra == 'full'
80
- Requires-Dist: dissect.squashfs <2,>=1 ; extra == 'full'
81
- Requires-Dist: dissect.sql <4,>=3 ; extra == 'full'
82
- Requires-Dist: dissect.thumbcache <2,>=1 ; extra == 'full'
83
- Requires-Dist: dissect.vmfs <4,>=3 ; extra == 'full'
84
- Requires-Dist: dissect.xfs <4,>=3 ; extra == 'full'
85
- Requires-Dist: ipython ; extra == 'full'
86
- Requires-Dist: fusepy ; extra == 'full'
87
- Requires-Dist: pycryptodome ; extra == 'full'
88
- Requires-Dist: ruamel.yaml ; extra == 'full'
89
- Requires-Dist: zstandard ; extra == 'full'
90
- Requires-Dist: dissect.fve <5,>=4 ; (platform_system != "Windows" or platform_python_implementation != "PyPy") and extra == 'full'
91
- Requires-Dist: tomli ; (python_version < "3.11") and extra == 'full'
92
- Provides-Extra: mqtt
93
- Requires-Dist: dissect.target[full] ; extra == 'mqtt'
94
- Requires-Dist: paho-mqtt ==1.6.1 ; extra == 'mqtt'
95
- Provides-Extra: smb
96
- Requires-Dist: dissect.target[full] ; extra == 'smb'
97
- Requires-Dist: impacket ==0.10.0 ; extra == 'smb'
37
+ Requires-Dist: asn1crypto; extra == "full"
38
+ Requires-Dist: dissect.archive<2,>=1; extra == "full"
39
+ Requires-Dist: dissect.btrfs<2,>=1; extra == "full"
40
+ Requires-Dist: dissect.cim<4,>=3; extra == "full"
41
+ Requires-Dist: dissect.clfs<2,>=1; extra == "full"
42
+ Requires-Dist: dissect.esedb<4,>=3; extra == "full"
43
+ Requires-Dist: dissect.etl<4,>=3; extra == "full"
44
+ Requires-Dist: dissect.extfs<4,>=3; extra == "full"
45
+ Requires-Dist: dissect.fat<4,>=3; extra == "full"
46
+ Requires-Dist: dissect.ffs<4,>=3; extra == "full"
47
+ Requires-Dist: dissect.fve<5,>=4; (platform_system != "Windows" or platform_python_implementation != "PyPy") and extra == "full"
48
+ Requires-Dist: dissect.jffs<2,>=1; extra == "full"
49
+ Requires-Dist: dissect.ole<4,>=3; extra == "full"
50
+ Requires-Dist: dissect.shellitem<4,>=3; extra == "full"
51
+ Requires-Dist: dissect.squashfs<2,>=1; extra == "full"
52
+ Requires-Dist: dissect.sql<4,>=3; extra == "full"
53
+ Requires-Dist: dissect.thumbcache<2,>=1; extra == "full"
54
+ Requires-Dist: dissect.vmfs<4,>=3; extra == "full"
55
+ Requires-Dist: dissect.xfs<4,>=3; extra == "full"
56
+ Requires-Dist: ipython; extra == "full"
57
+ Requires-Dist: fusepy; extra == "full"
58
+ Requires-Dist: pycryptodome; extra == "full"
59
+ Requires-Dist: ruamel.yaml; extra == "full"
60
+ Requires-Dist: tomli; python_version < "3.11" and extra == "full"
61
+ Requires-Dist: zstandard; extra == "full"
62
+ Provides-Extra: dev
63
+ Requires-Dist: dissect.target[full,mqtt,yara]; extra == "dev"
64
+ Requires-Dist: dissect.archive[dev]<2.0.dev,>=1.0.dev; extra == "dev"
65
+ Requires-Dist: dissect.btrfs[dev]<2.0.dev,>=1.0.dev; extra == "dev"
66
+ Requires-Dist: dissect.cim[dev]<4.0.dev,>=3.0.dev; extra == "dev"
67
+ Requires-Dist: dissect.clfs[dev]<2.0.dev,>=1.0.dev; extra == "dev"
68
+ Requires-Dist: dissect.cstruct<5.0.dev,>=4.0.dev; extra == "dev"
69
+ Requires-Dist: dissect.esedb[dev]<4.0.dev,>=3.0.dev; extra == "dev"
70
+ Requires-Dist: dissect.etl[dev]<4.0.dev,>=3.0.dev; extra == "dev"
71
+ Requires-Dist: dissect.eventlog[dev]<4.0.dev,>=3.0.dev; extra == "dev"
72
+ Requires-Dist: dissect.evidence[dev]<4.0.dev,>=3.0.dev; extra == "dev"
73
+ Requires-Dist: dissect.extfs[dev]<4.0.dev,>=3.0.dev; extra == "dev"
74
+ Requires-Dist: dissect.fat[dev]<4.0.dev,>=3.0.dev; extra == "dev"
75
+ Requires-Dist: dissect.ffs[dev]<4.0.dev,>=3.0.dev; extra == "dev"
76
+ Requires-Dist: dissect.fve[dev]<5.0.dev,>=4.0.dev; (platform_system != "Windows" or platform_python_implementation != "PyPy") and extra == "dev"
77
+ Requires-Dist: dissect.hypervisor[dev]<4.0.dev,>=3.0.dev; extra == "dev"
78
+ Requires-Dist: dissect.jffs[dev]<2.0.dev,>=1.0.dev; extra == "dev"
79
+ Requires-Dist: dissect.ntfs[dev]<4.0.dev,>=3.4.dev; extra == "dev"
80
+ Requires-Dist: dissect.regf[dev]<4.0.dev,>=3.3.dev; extra == "dev"
81
+ Requires-Dist: dissect.shellitem[dev]<4.0.dev,>=3.0.dev; extra == "dev"
82
+ Requires-Dist: dissect.sql[dev]<4.0.dev,>=3.0.dev; extra == "dev"
83
+ Requires-Dist: dissect.squashfs[dev]<2.0.dev,>=1.0.dev; extra == "dev"
84
+ Requires-Dist: dissect.thumbcache[dev]<2.0.dev,>=1.0.dev; extra == "dev"
85
+ Requires-Dist: dissect.util<4.0.dev,>=3.0.dev; extra == "dev"
86
+ Requires-Dist: dissect.vmfs[dev]<4.0.dev,>=3.0.dev; extra == "dev"
87
+ Requires-Dist: dissect.volume[dev]<4.0.dev,>=3.0.dev; extra == "dev"
88
+ Requires-Dist: dissect.xfs[dev]<4.0.dev,>=3.0.dev; extra == "dev"
98
89
  Provides-Extra: yara
99
- Requires-Dist: dissect.target[full] ; extra == 'yara'
100
- Requires-Dist: yara-python ; extra == 'yara'
90
+ Requires-Dist: dissect.target[full]; extra == "yara"
91
+ Requires-Dist: yara-python; extra == "yara"
92
+ Provides-Extra: smb
93
+ Requires-Dist: dissect.target[full]; extra == "smb"
94
+ Requires-Dist: impacket==0.10.0; extra == "smb"
95
+ Provides-Extra: cb
96
+ Requires-Dist: dissect.target[full]; extra == "cb"
97
+ Requires-Dist: carbon-black-cloud-sdk~=1.4.3; extra == "cb"
98
+ Provides-Extra: mqtt
99
+ Requires-Dist: dissect.target[full]; extra == "mqtt"
100
+ Requires-Dist: paho-mqtt==1.6.1; extra == "mqtt"
101
101
 
102
102
  # dissect.target
103
103
 
@@ -225,7 +225,7 @@ dissect/target/plugins/os/unix/bsd/osx/user.py,sha256=5rsGhsntBW9IXYIOrLpfYpSsJc
225
225
  dissect/target/plugins/os/unix/esxi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
226
226
  dissect/target/plugins/os/unix/esxi/_os.py,sha256=s6pAgUyfHh3QcY6sgvk5uVMmLvqK1tIHWR7MSbrFn8w,17789
227
227
  dissect/target/plugins/os/unix/etc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
228
- dissect/target/plugins/os/unix/etc/etc.py,sha256=QngR0nA1azvbNTau4U9-jKOjSoGdyduDpyEna_6yxWY,2636
228
+ dissect/target/plugins/os/unix/etc/etc.py,sha256=YSCRZZfQvmzaR5VWhTJhB8pIGliL6Nw5ruhdfvYKYaM,2783
229
229
  dissect/target/plugins/os/unix/linux/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
230
230
  dissect/target/plugins/os/unix/linux/_os.py,sha256=k1aHhWqocSHMVbF54VDw9wqwa0QSToOa69TMKAyQcxw,2979
231
231
  dissect/target/plugins/os/unix/linux/cmdline.py,sha256=n_Uetoplx33XpIY27oPtMaw1E2AbAEeGLCSkxHshWgY,1673
@@ -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.dev2.dist-info/COPYRIGHT,sha256=m-9ih2RVhMiXHI2bf_oNSSgHgkeIvaYRVfKTwFbnJPA,301
385
- dissect.target-3.21.dev2.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
386
- dissect.target-3.21.dev2.dist-info/METADATA,sha256=CTHczoLyn0a2fvRz-vr8ZIwgmq45_UFoO7PLB2SQpqA,13302
387
- dissect.target-3.21.dev2.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
388
- dissect.target-3.21.dev2.dist-info/entry_points.txt,sha256=BWuxAb_6AvUAQpIQOQU0IMTlaF6TDht2AIZK8bHd-zE,492
389
- dissect.target-3.21.dev2.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
390
- dissect.target-3.21.dev2.dist-info/RECORD,,
384
+ dissect.target-3.21.dev3.dist-info/COPYRIGHT,sha256=m-9ih2RVhMiXHI2bf_oNSSgHgkeIvaYRVfKTwFbnJPA,301
385
+ dissect.target-3.21.dev3.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
386
+ dissect.target-3.21.dev3.dist-info/METADATA,sha256=krLCWFNjd5yyUqcYsAEFm-PSOsLJLMLhTOyG54hXbvg,13186
387
+ dissect.target-3.21.dev3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
388
+ dissect.target-3.21.dev3.dist-info/entry_points.txt,sha256=BWuxAb_6AvUAQpIQOQU0IMTlaF6TDht2AIZK8bHd-zE,492
389
+ dissect.target-3.21.dev3.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
390
+ dissect.target-3.21.dev3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.5.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5