dissect.hypervisor 3.22.dev1__py3-none-any.whl → 3.22.dev3__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/hypervisor/__init__.py +2 -0
- dissect/hypervisor/descriptor/vmx.py +1 -7
- dissect/hypervisor/disk/vmdk.py +1 -4
- dissect/hypervisor/exceptions.py +3 -0
- dissect/hypervisor/tools/vmtar.py +2 -0
- dissect/hypervisor/util/vmtar.py +2 -2
- {dissect_hypervisor-3.22.dev1.dist-info → dissect_hypervisor-3.22.dev3.dist-info}/METADATA +1 -1
- {dissect_hypervisor-3.22.dev1.dist-info → dissect_hypervisor-3.22.dev3.dist-info}/RECORD +13 -13
- {dissect_hypervisor-3.22.dev1.dist-info → dissect_hypervisor-3.22.dev3.dist-info}/WHEEL +1 -1
- {dissect_hypervisor-3.22.dev1.dist-info → dissect_hypervisor-3.22.dev3.dist-info}/entry_points.txt +0 -0
- {dissect_hypervisor-3.22.dev1.dist-info → dissect_hypervisor-3.22.dev3.dist-info}/licenses/COPYRIGHT +0 -0
- {dissect_hypervisor-3.22.dev1.dist-info → dissect_hypervisor-3.22.dev3.dist-info}/licenses/LICENSE +0 -0
- {dissect_hypervisor-3.22.dev1.dist-info → dissect_hypervisor-3.22.dev3.dist-info}/top_level.txt +0 -0
dissect/hypervisor/__init__.py
CHANGED
|
@@ -101,7 +101,7 @@ class VMX:
|
|
|
101
101
|
self.attr.update(**_parse_dictionary(decrypted.decode()))
|
|
102
102
|
|
|
103
103
|
def disks(self) -> list[str]:
|
|
104
|
-
"""Return a list of paths to disk files"""
|
|
104
|
+
"""Return a list of paths to disk files."""
|
|
105
105
|
dev_classes = ("scsi", "sata", "ide", "nvme")
|
|
106
106
|
devices = {}
|
|
107
107
|
|
|
@@ -179,7 +179,6 @@ class KeySafe:
|
|
|
179
179
|
@classmethod
|
|
180
180
|
def from_text(cls, text: str) -> KeySafe:
|
|
181
181
|
"""Parse a ``KeySafe`` from a string."""
|
|
182
|
-
|
|
183
182
|
# Key safes are a list of key locators. It's a key locator string with a specific prefix
|
|
184
183
|
identifier, _, remainder = text.partition("/")
|
|
185
184
|
if identifier != "vmware:key":
|
|
@@ -262,7 +261,6 @@ def _parse_key_locator(locator_string: str) -> Pair | Phrase | list[Pair | Phras
|
|
|
262
261
|
|
|
263
262
|
Interally called ``KeyLocator``.
|
|
264
263
|
"""
|
|
265
|
-
|
|
266
264
|
identifier, _, remainder = locator_string.partition("/")
|
|
267
265
|
|
|
268
266
|
if identifier == "list":
|
|
@@ -303,7 +301,6 @@ def _split_list(value: str) -> list[str]:
|
|
|
303
301
|
Lists are wrapped by braces and separated by comma. They can contain nested lists/pairs,
|
|
304
302
|
so we need to separate at the correct nest level.
|
|
305
303
|
"""
|
|
306
|
-
|
|
307
304
|
if not (match := re.match(r"\((.+)\)", value)):
|
|
308
305
|
raise ValueError("Invalid list string")
|
|
309
306
|
|
|
@@ -337,7 +334,6 @@ def _parse_crypto_dict(dict_string: str) -> dict[str, str]:
|
|
|
337
334
|
|
|
338
335
|
Internally called ``CryptoDict``.
|
|
339
336
|
"""
|
|
340
|
-
|
|
341
337
|
crypto_dict = {}
|
|
342
338
|
for part in dict_string.split(":"):
|
|
343
339
|
key, _, value = part.partition("=")
|
|
@@ -351,7 +347,6 @@ def _decrypt_hmac(key: bytes, data: bytes, digest: str) -> bytes:
|
|
|
351
347
|
First 16 bytes of the ciphertext are the IV and the last N bytes are the HMAC digest.
|
|
352
348
|
The cleartext is padded using PKCS#7.
|
|
353
349
|
"""
|
|
354
|
-
|
|
355
350
|
digest, digest_size = HMAC_MAP[digest]
|
|
356
351
|
|
|
357
352
|
iv, encrypted, mac = data[:16], data[16:-digest_size], data[-digest_size:]
|
|
@@ -374,7 +369,6 @@ def _create_cipher(key: bytes, iv: bytes) -> AES.CbcMode:
|
|
|
374
369
|
|
|
375
370
|
Dynamic based on the available crypto module.
|
|
376
371
|
"""
|
|
377
|
-
|
|
378
372
|
if HAS_PYSTANDALONE:
|
|
379
373
|
if len(key) == 32:
|
|
380
374
|
cipher = "aes-256-cbc"
|
dissect/hypervisor/disk/vmdk.py
CHANGED
|
@@ -29,9 +29,7 @@ log.setLevel(os.getenv("DISSECT_LOG_VMDK", "CRITICAL"))
|
|
|
29
29
|
|
|
30
30
|
class VMDK(AlignedStream):
|
|
31
31
|
def __init__(self, fh: BinaryIO | Path | str | list[BinaryIO | Path | str]):
|
|
32
|
-
"""
|
|
33
|
-
Input can be a file handle to a Disk Descriptor file or a list of file handles to multiple VMDK files.
|
|
34
|
-
"""
|
|
32
|
+
"""Input can be a file handle to a Disk Descriptor file or a list of file handles to multiple VMDK files."""
|
|
35
33
|
fhs = [fh] if not isinstance(fh, list) else fh
|
|
36
34
|
|
|
37
35
|
self.disks = []
|
|
@@ -462,7 +460,6 @@ class DiskDescriptor:
|
|
|
462
460
|
Resources:
|
|
463
461
|
- https://github.com/libyal/libvmdk/blob/main/documentation/VMWare%20Virtual%20Disk%20Format%20(VMDK).asciidoc
|
|
464
462
|
"""
|
|
465
|
-
|
|
466
463
|
descriptor_settings = {}
|
|
467
464
|
extents: list[ExtentDescriptor] = []
|
|
468
465
|
disk_db = {}
|
dissect/hypervisor/exceptions.py
CHANGED
dissect/hypervisor/util/vmtar.py
CHANGED
|
@@ -62,12 +62,12 @@ class VisorTarFile(tarfile.TarFile):
|
|
|
62
62
|
raise tarfile.TarError("visor currently only supports read mode")
|
|
63
63
|
|
|
64
64
|
try:
|
|
65
|
-
from gzip import GzipFile
|
|
65
|
+
from gzip import GzipFile
|
|
66
66
|
except ImportError:
|
|
67
67
|
raise tarfile.CompressionError("gzip module is not available") from None
|
|
68
68
|
|
|
69
69
|
try:
|
|
70
|
-
from lzma import LZMAError, LZMAFile
|
|
70
|
+
from lzma import LZMAError, LZMAFile
|
|
71
71
|
except ImportError:
|
|
72
72
|
raise tarfile.CompressionError("lzma module is not available") from None
|
|
73
73
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dissect.hypervisor
|
|
3
|
-
Version: 3.22.
|
|
3
|
+
Version: 3.22.dev3
|
|
4
4
|
Summary: A Dissect module implementing parsers for various hypervisor disk, backup and configuration files
|
|
5
5
|
Author-email: Dissect Team <dissect@fox-it.com>
|
|
6
6
|
License-Expression: AGPL-3.0-or-later
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
dissect/hypervisor/__init__.py,sha256=
|
|
2
|
-
dissect/hypervisor/exceptions.py,sha256=
|
|
1
|
+
dissect/hypervisor/__init__.py,sha256=Ws-X8SrKohjhD9mFgySKuGEYsf6D3V4ktVWb4vlEN38,418
|
|
2
|
+
dissect/hypervisor/exceptions.py,sha256=MexvnJmZbCnYoAoFbTc67iILlvMkpUpaPla_x9otGYQ,200
|
|
3
3
|
dissect/hypervisor/descriptor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
dissect/hypervisor/descriptor/c_hyperv.py,sha256=l_iW7CjK4DGJkg8NzNINFltA-txEPh-t17KYaSSNiDs,4405
|
|
5
5
|
dissect/hypervisor/descriptor/hyperv.py,sha256=B71-TKGpndRfKHSRSaSDA1ak6rQiNlDLs97burrJwkw,17643
|
|
6
6
|
dissect/hypervisor/descriptor/ovf.py,sha256=9TbUgY1F11EnSgUQYrkaJawGJeD-Swr1xHcH39Hpttc,1922
|
|
7
7
|
dissect/hypervisor/descriptor/pvs.py,sha256=Ek8_m5PsyAWSFMD-q_E2j1fRqq5bb8g8ZiahlQSBcvI,701
|
|
8
8
|
dissect/hypervisor/descriptor/vbox.py,sha256=Kzls0YJsn02gFtMNFcAuShClTgji7qg5T7GzBzmoWrs,6650
|
|
9
|
-
dissect/hypervisor/descriptor/vmx.py,sha256=
|
|
9
|
+
dissect/hypervisor/descriptor/vmx.py,sha256=HHmQI92QMnufeFyphCWUI8hWeJci5XsYAB4GePd6Lhs,12642
|
|
10
10
|
dissect/hypervisor/disk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
dissect/hypervisor/disk/asif.py,sha256=-HIXnoG8uFGTFj58kTRayVUqWtIPPKF04xMpiOYBL18,10840
|
|
12
12
|
dissect/hypervisor/disk/c_asif.py,sha256=bVjbXy6icCLY6-v2zZ22xnOsHdupnO4oOAmyuZx13lU,878
|
|
@@ -24,17 +24,17 @@ dissect/hypervisor/disk/qcow2.py,sha256=Em628ixzU6Wey8yIhTlKbp4O8LSksR7Ive3knbX0
|
|
|
24
24
|
dissect/hypervisor/disk/vdi.py,sha256=URS0JNvBZVEWnZQYV6nrgsMBXmumDIIem5Eqmv-VVG0,4479
|
|
25
25
|
dissect/hypervisor/disk/vhd.py,sha256=GfEfFp5g8OlV0MrTXqSfBRzMMvIZO_T1A8d05SeGiBk,3948
|
|
26
26
|
dissect/hypervisor/disk/vhdx.py,sha256=kgxS81oG4J3RPsDput-t3QhbF1vDCdjfPqY__sWbX6g,13215
|
|
27
|
-
dissect/hypervisor/disk/vmdk.py,sha256=
|
|
27
|
+
dissect/hypervisor/disk/vmdk.py,sha256=7HawKrwlq2_7n1NguCftXBNX_NXglkm2d_D5lJ0LGvE,19653
|
|
28
28
|
dissect/hypervisor/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
29
|
dissect/hypervisor/tools/envelope.py,sha256=BvaBSoXq3VrZ2GJVrfnL8NB6OLbdp8qD05jedxSAKwQ,1024
|
|
30
|
-
dissect/hypervisor/tools/vmtar.py,sha256=
|
|
30
|
+
dissect/hypervisor/tools/vmtar.py,sha256=ArqAAUjSqktDmGCP6m-Bp1ujqWkDtCGC3xKz-WBa4m4,512
|
|
31
31
|
dissect/hypervisor/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
dissect/hypervisor/util/envelope.py,sha256=EhZjZh3EezqxkJ84OgqpptHIhpVWPcUkFMjdYU-iAnU,10442
|
|
33
|
-
dissect/hypervisor/util/vmtar.py,sha256=
|
|
34
|
-
dissect_hypervisor-3.22.
|
|
35
|
-
dissect_hypervisor-3.22.
|
|
36
|
-
dissect_hypervisor-3.22.
|
|
37
|
-
dissect_hypervisor-3.22.
|
|
38
|
-
dissect_hypervisor-3.22.
|
|
39
|
-
dissect_hypervisor-3.22.
|
|
40
|
-
dissect_hypervisor-3.22.
|
|
33
|
+
dissect/hypervisor/util/vmtar.py,sha256=xzc4bd5RnBgP9_dCU9i-ZwXI_0S3N7gCfMzElwwnd5s,4004
|
|
34
|
+
dissect_hypervisor-3.22.dev3.dist-info/licenses/COPYRIGHT,sha256=EOOoIwk_inOMUD4c1ylpzMtYLjGzmc-MLEVAEdLLr20,305
|
|
35
|
+
dissect_hypervisor-3.22.dev3.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
|
36
|
+
dissect_hypervisor-3.22.dev3.dist-info/METADATA,sha256=vxysX3EN8XSQZHU7i47lA7JID71BH4abIn5zH5yZweg,3470
|
|
37
|
+
dissect_hypervisor-3.22.dev3.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
38
|
+
dissect_hypervisor-3.22.dev3.dist-info/entry_points.txt,sha256=kW36GnJ3G1dSRYFL4r8Bj32Al_CkGqST3bdHvo3pyiY,120
|
|
39
|
+
dissect_hypervisor-3.22.dev3.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
|
|
40
|
+
dissect_hypervisor-3.22.dev3.dist-info/RECORD,,
|
{dissect_hypervisor-3.22.dev1.dist-info → dissect_hypervisor-3.22.dev3.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{dissect_hypervisor-3.22.dev1.dist-info → dissect_hypervisor-3.22.dev3.dist-info}/licenses/COPYRIGHT
RENAMED
|
File without changes
|
{dissect_hypervisor-3.22.dev1.dist-info → dissect_hypervisor-3.22.dev3.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{dissect_hypervisor-3.22.dev1.dist-info → dissect_hypervisor-3.22.dev3.dist-info}/top_level.txt
RENAMED
|
File without changes
|