dissect.hypervisor 3.14.dev3__py3-none-any.whl → 3.15.dev2__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.
@@ -11,7 +11,7 @@ class VBox:
11
11
  self._xml: Element = ElementTree.fromstring(fh.read())
12
12
 
13
13
  def disks(self) -> Iterator[str]:
14
- for hdd_elem in self._xml.findall(
15
- f".//{self.VBOX_XML_NAMESPACE}HardDisk[@location][@format='VDI'][@type='Normal']"
16
- ):
17
- yield hdd_elem.attrib["location"]
14
+ for hdd_elem in self._xml.findall(f".//{self.VBOX_XML_NAMESPACE}HardDisk[@location][@type='Normal']"):
15
+ # Allow format specifier to be case-insensitive (i.e. VDI, vdi)
16
+ if (format := hdd_elem.get("format")) and format.lower() == "vdi":
17
+ yield hdd_elem.attrib["location"]
@@ -103,8 +103,9 @@ EnvelopeAttribute = namedtuple("EnvelopeAttribute", ("type", "flag", "value"))
103
103
  class Envelope:
104
104
  """Implements an encryption envelope as used within ESXi."""
105
105
 
106
- def __init__(self, fh: BinaryIO):
106
+ def __init__(self, fh: BinaryIO, verify: bool = True):
107
107
  self.fh = fh
108
+ self.verify = verify
108
109
 
109
110
  header_buf = io.BytesIO(self.fh.read(ENVELOPE_BLOCK_SIZE))
110
111
  self.header = c_envelope.EnvelopeFileHeader(header_buf)
@@ -190,7 +191,8 @@ class Envelope:
190
191
  footer = c_envelope.DataTransformCryptoFooter(bytes(decrypted[-512:]))
191
192
  decrypted = decrypted[: -4096 - footer.padding]
192
193
 
193
- cipher.verify(self.digest)
194
+ if self.verify:
195
+ cipher.verify(self.digest)
194
196
 
195
197
  return bytes(decrypted)
196
198
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dissect.hypervisor
3
- Version: 3.14.dev3
3
+ Version: 3.15.dev2
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: Affero General Public License v3
@@ -9,7 +9,7 @@ dissect/hypervisor/descriptor/c_hyperv.py,sha256=QsMIn5sLeirmHM6mfwEpXoUpl0rJYTw
9
9
  dissect/hypervisor/descriptor/hyperv.py,sha256=MQTpcAK9oxiiCyCSSrLNElmQ0lS1vzAcXqImDPmhLQ0,17692
10
10
  dissect/hypervisor/descriptor/ovf.py,sha256=99Q0IO9sCs9g-N8iFSkwQYFsBK17Fcqsdex6JqJFJdc,1815
11
11
  dissect/hypervisor/descriptor/pvs.py,sha256=m4sjaCU0dcoB4zTBWlxo2qrOD0kuSmEe97-8UpcFdPI,588
12
- dissect/hypervisor/descriptor/vbox.py,sha256=mPmgD0Hyr5c7lFCnZjt0mUS1h490LlRiTyE4CiBW6tc,509
12
+ dissect/hypervisor/descriptor/vbox.py,sha256=RPq8JvPNY6bRW6CUL627dgmCiMUWcEK1eLlv9GiJP_s,631
13
13
  dissect/hypervisor/descriptor/vmx.py,sha256=LABtrrh-LYwHxsP07iZ6F2zoKiVXWxaxwCe5ArsDf-M,12500
14
14
  dissect/hypervisor/disk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  dissect/hypervisor/disk/c_hdd.py,sha256=2kmoZyFgXB2JL7m7iPEgMzSD5oD5WFGhmF1VjH6Hzuk,2201
@@ -28,12 +28,12 @@ dissect/hypervisor/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
28
28
  dissect/hypervisor/tools/envelope.py,sha256=6_RLtKmFnZ69fx8HlvFgsjDjNrfnXD73dgszpG1mYQE,967
29
29
  dissect/hypervisor/tools/vma.py,sha256=N8x4Yh45BM5MweLSriwhAfSegbjw_Ko4i2yayMWF3rw,5422
30
30
  dissect/hypervisor/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
- dissect/hypervisor/util/envelope.py,sha256=dRVyhtMTL5CKRxv40bAeRTrHx1MTOZ5czJbIV2brmL0,10327
31
+ dissect/hypervisor/util/envelope.py,sha256=6nEJfgsxj696qxaLOQ2k5MrVWA2uLkbB5zxxRAvboF4,10405
32
32
  dissect/hypervisor/util/vmtar.py,sha256=oNJ-qTvQVOl7al_vExpg_T4LnGyE72O9hjOmQBiTKSA,1469
33
- dissect.hypervisor-3.14.dev3.dist-info/COPYRIGHT,sha256=EOOoIwk_inOMUD4c1ylpzMtYLjGzmc-MLEVAEdLLr20,305
34
- dissect.hypervisor-3.14.dev3.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
35
- dissect.hypervisor-3.14.dev3.dist-info/METADATA,sha256=NDAxHwLfmSX4xXMIt_YhRd3o7pL7lPXZBtwcfy9u3WY,3458
36
- dissect.hypervisor-3.14.dev3.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
37
- dissect.hypervisor-3.14.dev3.dist-info/entry_points.txt,sha256=qwOrIPRV4bYsKo2sAZznUqegFTMu1sm7ld-o7w_h_5U,124
38
- dissect.hypervisor-3.14.dev3.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
39
- dissect.hypervisor-3.14.dev3.dist-info/RECORD,,
33
+ dissect.hypervisor-3.15.dev2.dist-info/COPYRIGHT,sha256=EOOoIwk_inOMUD4c1ylpzMtYLjGzmc-MLEVAEdLLr20,305
34
+ dissect.hypervisor-3.15.dev2.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
35
+ dissect.hypervisor-3.15.dev2.dist-info/METADATA,sha256=UUeKTwLZFjF5Ln7VM_rH0CtZyhceWZKIRVdMIkzXils,3458
36
+ dissect.hypervisor-3.15.dev2.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
37
+ dissect.hypervisor-3.15.dev2.dist-info/entry_points.txt,sha256=qwOrIPRV4bYsKo2sAZznUqegFTMu1sm7ld-o7w_h_5U,124
38
+ dissect.hypervisor-3.15.dev2.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
39
+ dissect.hypervisor-3.15.dev2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.1)
2
+ Generator: setuptools (74.1.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5