dissect.hypervisor 3.18__tar.gz → 3.19.dev1__tar.gz

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.
Files changed (88) hide show
  1. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/PKG-INFO +1 -1
  2. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/disk/qcow2.py +14 -3
  3. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect.hypervisor.egg-info/PKG-INFO +1 -1
  4. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/pyproject.toml +1 -0
  5. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/.git-blame-ignore-revs +0 -0
  6. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/COPYRIGHT +0 -0
  7. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/LICENSE +0 -0
  8. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/MANIFEST.in +0 -0
  9. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/README.md +0 -0
  10. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/__init__.py +0 -0
  11. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/descriptor/__init__.py +0 -0
  12. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/descriptor/c_hyperv.py +0 -0
  13. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/descriptor/hyperv.py +0 -0
  14. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/descriptor/ovf.py +0 -0
  15. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/descriptor/pvs.py +0 -0
  16. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/descriptor/vbox.py +0 -0
  17. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/descriptor/vmx.py +0 -0
  18. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/disk/__init__.py +0 -0
  19. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/disk/c_hdd.py +0 -0
  20. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/disk/c_qcow2.py +0 -0
  21. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/disk/c_vdi.py +0 -0
  22. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/disk/c_vhd.py +0 -0
  23. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/disk/c_vhdx.py +0 -0
  24. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/disk/c_vmdk.py +0 -0
  25. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/disk/hdd.py +0 -0
  26. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/disk/vdi.py +0 -0
  27. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/disk/vhd.py +0 -0
  28. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/disk/vhdx.py +0 -0
  29. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/disk/vmdk.py +0 -0
  30. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/exceptions.py +0 -0
  31. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/tools/__init__.py +0 -0
  32. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/tools/envelope.py +0 -0
  33. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/tools/vmtar.py +0 -0
  34. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/util/__init__.py +0 -0
  35. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/util/envelope.py +0 -0
  36. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect/hypervisor/util/vmtar.py +0 -0
  37. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect.hypervisor.egg-info/SOURCES.txt +0 -0
  38. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect.hypervisor.egg-info/dependency_links.txt +0 -0
  39. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect.hypervisor.egg-info/entry_points.txt +0 -0
  40. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect.hypervisor.egg-info/requires.txt +0 -0
  41. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/dissect.hypervisor.egg-info/top_level.txt +0 -0
  42. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/setup.cfg +0 -0
  43. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/__init__.py +0 -0
  44. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/descriptor/hyperv/test.VMRS +0 -0
  45. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/descriptor/hyperv/test.vmcx +0 -0
  46. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/descriptor/vmx/encrypted.vmx +0 -0
  47. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/hdd/expanding.hdd/DiskDescriptor.xml +0 -0
  48. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/hdd/expanding.hdd/expanding.hdd +0 -0
  49. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/hdd/expanding.hdd/expanding.hdd.0.{5fbaabe3-6958-40ff-92a7-860e329aab41}.hds.gz +0 -0
  50. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/hdd/plain.hdd/DiskDescriptor.xml +0 -0
  51. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/hdd/plain.hdd/plain.hdd +0 -0
  52. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/hdd/plain.hdd/plain.hdd.0.{5fbaabe3-6958-40ff-92a7-860e329aab41}.hds.gz +0 -0
  53. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/hdd/split.hdd/DiskDescriptor.xml +0 -0
  54. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/hdd/split.hdd/split.hdd +0 -0
  55. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/hdd/split.hdd/split.hdd.0.{5fbaabe3-6958-40ff-92a7-860e329aab41}.hds.gz +0 -0
  56. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/hdd/split.hdd/split.hdd.1.{5fbaabe3-6958-40ff-92a7-860e329aab41}.hds.gz +0 -0
  57. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/hdd/split.hdd/split.hdd.2.{5fbaabe3-6958-40ff-92a7-860e329aab41}.hds.gz +0 -0
  58. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/hdd/split.hdd/split.hdd.3.{5fbaabe3-6958-40ff-92a7-860e329aab41}.hds.gz +0 -0
  59. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/hdd/split.hdd/split.hdd.4.{5fbaabe3-6958-40ff-92a7-860e329aab41}.hds.gz +0 -0
  60. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/hdd/split.hdd/split.hdd.5.{5fbaabe3-6958-40ff-92a7-860e329aab41}.hds.gz +0 -0
  61. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/vhd/dynamic.vhd.gz +0 -0
  62. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/vhd/fixed.vhd.gz +0 -0
  63. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/vhdx/differencing.avhdx.gz +0 -0
  64. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/vhdx/dynamic.vhdx.gz +0 -0
  65. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/vhdx/fixed.vhdx.gz +0 -0
  66. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/disk/vmdk/sesparse.vmdk.gz +0 -0
  67. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/util/envelope/encryption.info +0 -0
  68. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/util/envelope/local.tgz.ve +0 -0
  69. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_data/util/vmtar/test.vgz +0 -0
  70. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_docs/Makefile +0 -0
  71. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_docs/conf.py +0 -0
  72. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/_docs/index.rst +0 -0
  73. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/conftest.py +0 -0
  74. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/descriptor/__init__.py +0 -0
  75. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/descriptor/test_hyperv.py +0 -0
  76. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/descriptor/test_ovf.py +0 -0
  77. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/descriptor/test_pvs.py +0 -0
  78. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/descriptor/test_vbox.py +0 -0
  79. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/descriptor/test_vmx.py +0 -0
  80. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/disk/__init__.py +0 -0
  81. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/disk/test_hdd.py +0 -0
  82. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/disk/test_vhd.py +0 -0
  83. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/disk/test_vhdx.py +0 -0
  84. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/disk/test_vmdk.py +0 -0
  85. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/util/__init__.py +0 -0
  86. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/util/test_envelope.py +0 -0
  87. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tests/util/test_vmtar.py +0 -0
  88. {dissect_hypervisor-3.18 → dissect_hypervisor-3.19.dev1}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dissect.hypervisor
3
- Version: 3.18
3
+ Version: 3.19.dev1
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
@@ -7,6 +7,7 @@ import copy
7
7
  import zlib
8
8
  from functools import cached_property, lru_cache
9
9
  from io import BytesIO
10
+ from pathlib import Path
10
11
  from typing import TYPE_CHECKING, BinaryIO
11
12
 
12
13
  from dissect.util.stream import AlignedStream
@@ -50,8 +51,10 @@ class QCow2(AlignedStream):
50
51
  in all null bytes being read.
51
52
  """
52
53
 
53
- def __init__(self, fh: BinaryIO, data_file: BinaryIO | None = None, backing_file: BinaryIO | int | None = None):
54
- self.fh = fh
54
+ def __init__(
55
+ self, fh: BinaryIO | Path, data_file: BinaryIO | None = None, backing_file: BinaryIO | int | None = None
56
+ ):
57
+ self.fh = fh.open("rb") if isinstance(fh, Path) else fh
55
58
 
56
59
  self.header = c_qcow2.QCowHeader(fh)
57
60
  if self.header.magic != QCOW2_MAGIC:
@@ -116,7 +119,15 @@ class QCow2(AlignedStream):
116
119
  self.image_backing_file = self.auto_backing_file.upper()
117
120
 
118
121
  if backing_file is None:
119
- raise Error(f"backing-file required but not provided (auto_backing_file = {self.auto_backing_file})")
122
+ if not isinstance(fh, Path):
123
+ raise Error(
124
+ f"backing-file required but not provided (auto_backing_file = {self.auto_backing_file})"
125
+ )
126
+ if not (candidate_path := fh.parent.joinpath(self.auto_backing_file)).exists():
127
+ raise Error(
128
+ f"backing-file '{candidate_path}' not found (auto_backing_file = '{self.auto_backing_file}')"
129
+ )
130
+ backing_file = candidate_path.open("rb")
120
131
 
121
132
  if backing_file != ALLOW_NO_BACKING_FILE:
122
133
  self.backing_file = backing_file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dissect.hypervisor
3
- Version: 3.18
3
+ Version: 3.19.dev1
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
@@ -108,3 +108,4 @@ license-files = ["LICENSE", "COPYRIGHT"]
108
108
  include = ["dissect.*"]
109
109
 
110
110
  [tool.setuptools_scm]
111
+ local_scheme = "no-local-version"