dissect.vmfs 3.12.dev2__tar.gz → 3.13__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.
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/PKG-INFO +3 -4
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect/vmfs/c_lvm.pyi +1 -2
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect/vmfs/c_vmfs.pyi +1 -2
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect/vmfs/descriptor.py +21 -10
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect/vmfs/resource.py +3 -1
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect.vmfs.egg-info/PKG-INFO +3 -4
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect.vmfs.egg-info/SOURCES.txt +2 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/pyproject.toml +25 -9
- dissect_vmfs-3.13/tests/_data/vmfs/zero5.bin.gz +0 -0
- dissect_vmfs-3.13/tests/_data/vmfs/zero6.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/test_vmfs.py +18 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tox.ini +8 -10
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/.git-blame-ignore-revs +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/.gitattributes +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/COPYRIGHT +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/LICENSE +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/MANIFEST.in +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/README.md +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect/vmfs/__init__.py +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect/vmfs/address.py +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect/vmfs/c_lvm.py +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect/vmfs/c_vmfs.py +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect/vmfs/exception.py +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect/vmfs/lvm.py +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect/vmfs/util.py +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect/vmfs/vmfs.py +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect.vmfs.egg-info/dependency_links.txt +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect.vmfs.egg-info/requires.txt +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/dissect.vmfs.egg-info/top_level.txt +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/setup.cfg +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/__init__.py +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/lvm/huge/lvm5.csv.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/lvm/huge/lvm6.csv.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/lvm/lvm3.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/lvm/lvm4.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/lvm/lvm5.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/lvm/lvm6.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/lvm/span/lvm3-span-0.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/lvm/span/lvm3-span-1.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/lvm/span/lvm4-span-0.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/lvm/span/lvm4-span-1.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/lvm/span/lvm5-span-0.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/lvm/span/lvm5-span-1.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/lvm/span/lvm6-span-0.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/lvm/span/lvm6-span-1.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/span/vmfs5-span-0.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/span/vmfs5-span-1.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/span/vmfs6-span-0.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/span/vmfs6-span-1.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/vmfs5-no-dense-sbpc.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/vmfs5-resource-optimized.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/vmfs5.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/vmfs5d.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/vmfs5l.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/vmfs5ld.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/vmfs6-resource-optimized.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/vmfs6.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/vmfs6d.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/vmfs6l.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/vmfs6ld.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs.bin.gz +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_docs/Makefile +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_docs/conf.py +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_docs/index.rst +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/conftest.py +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/test_exception.py +0 -0
- {dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/test_lvm.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dissect.vmfs
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.13
|
|
4
4
|
Summary: A Dissect module implementing a parser for the VMFS file system, used by VMware virtualization software
|
|
5
5
|
Author-email: Dissect Team <dissect@fox-it.com>
|
|
6
|
-
License:
|
|
6
|
+
License-Expression: AGPL-3.0-or-later
|
|
7
7
|
Project-URL: homepage, https://dissect.tools
|
|
8
8
|
Project-URL: documentation, https://docs.dissect.tools/en/latest/projects/dissect.vmfs
|
|
9
9
|
Project-URL: repository, https://github.com/fox-it/dissect.vmfs
|
|
@@ -11,14 +11,13 @@ Classifier: Development Status :: 5 - Production/Stable
|
|
|
11
11
|
Classifier: Environment :: Console
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Intended Audience :: Information Technology
|
|
14
|
-
Classifier: License :: OSI Approved
|
|
15
14
|
Classifier: Operating System :: OS Independent
|
|
16
15
|
Classifier: Programming Language :: Python :: 3
|
|
17
16
|
Classifier: Topic :: Internet :: Log Analysis
|
|
18
17
|
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
19
18
|
Classifier: Topic :: Security
|
|
20
19
|
Classifier: Topic :: Utilities
|
|
21
|
-
Requires-Python:
|
|
20
|
+
Requires-Python: >=3.10
|
|
22
21
|
Description-Content-Type: text/markdown
|
|
23
22
|
License-File: LICENSE
|
|
24
23
|
License-File: COPYRIGHT
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Generated by cstruct-stubgen
|
|
2
|
-
from typing import BinaryIO, Literal, overload
|
|
2
|
+
from typing import BinaryIO, Literal, TypeAlias, overload
|
|
3
3
|
|
|
4
4
|
import dissect.cstruct as __cs__
|
|
5
|
-
from typing_extensions import TypeAlias
|
|
6
5
|
|
|
7
6
|
class _c_lvm(__cs__.cstruct):
|
|
8
7
|
DISK_BLOCK_SIZE_512B: Literal[512] = ...
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Generated by cstruct-stubgen
|
|
2
|
-
from typing import BinaryIO, Literal, overload
|
|
2
|
+
from typing import BinaryIO, Literal, TypeAlias, overload
|
|
3
3
|
|
|
4
4
|
import dissect.cstruct as __cs__
|
|
5
|
-
from typing_extensions import TypeAlias
|
|
6
5
|
|
|
7
6
|
class _c_vmfs(__cs__.cstruct):
|
|
8
7
|
rootDirDescAddr: Literal[4] = ...
|
|
@@ -131,7 +131,7 @@ class FileDescriptor:
|
|
|
131
131
|
type_str = {
|
|
132
132
|
FS3_DescriptorType.DIRECTORY: "dir",
|
|
133
133
|
FS3_DescriptorType.REGFILE: "reg",
|
|
134
|
-
FS3_DescriptorType.
|
|
134
|
+
FS3_DescriptorType.SYSFILE: "sys",
|
|
135
135
|
FS3_DescriptorType.RDM: "rdm",
|
|
136
136
|
}.get(self.type, "oth")
|
|
137
137
|
|
|
@@ -451,7 +451,8 @@ class FileDescriptor5(FileDescriptor):
|
|
|
451
451
|
primary_num = block_num >> self.vmfs._ptr_block_num_shift
|
|
452
452
|
secondary_num = block_num & ((1 << self.vmfs._ptr_block_num_shift) - 1)
|
|
453
453
|
|
|
454
|
-
block
|
|
454
|
+
if (block := self.blocks[primary_num]) == 0:
|
|
455
|
+
return 0
|
|
455
456
|
pb_buf = self.vmfs.resources.read(block)
|
|
456
457
|
|
|
457
458
|
return _get_uint32_index(pb_buf, secondary_num)
|
|
@@ -461,10 +462,12 @@ class FileDescriptor5(FileDescriptor):
|
|
|
461
462
|
secondary_num = (block_num >> self.vmfs._ptr_block_num_shift) & ((1 << self.vmfs._ptr_block_num_shift) - 1)
|
|
462
463
|
tertiary_num = block_num & ((1 << self.vmfs._ptr_block_num_shift) - 1)
|
|
463
464
|
|
|
464
|
-
block
|
|
465
|
+
if (block := self.blocks[primary_num]) == 0:
|
|
466
|
+
return 0
|
|
465
467
|
pb_buf = self.vmfs.resources.read(block)
|
|
466
468
|
|
|
467
|
-
block
|
|
469
|
+
if (block := _get_uint32_index(pb_buf, secondary_num)) == 0:
|
|
470
|
+
return 0
|
|
468
471
|
pb_buf = self.vmfs.resources.read(block)
|
|
469
472
|
|
|
470
473
|
return _get_uint32_index(pb_buf, tertiary_num)
|
|
@@ -482,7 +485,10 @@ class FileDescriptor5(FileDescriptor):
|
|
|
482
485
|
if self.zla == FS3_ZeroLevelAddrType.FILE_DESCRIPTOR_RESIDENT:
|
|
483
486
|
return self._resolve_resident_offset(offset), 0
|
|
484
487
|
|
|
485
|
-
block
|
|
488
|
+
if (block := self._offset_to_block_address(offset)) == 0:
|
|
489
|
+
# Return early with a TBZ set for 0 blocks
|
|
490
|
+
return 0, 1
|
|
491
|
+
|
|
486
492
|
type = address_type(block)
|
|
487
493
|
|
|
488
494
|
if resource := self.vmfs.resources.get(type):
|
|
@@ -718,7 +724,8 @@ class FileDescriptor6(FileDescriptor):
|
|
|
718
724
|
primary_num = block_num >> self.vmfs._ptr_block_num_shift
|
|
719
725
|
secondary_num = block_num & ((1 << self.vmfs._ptr_block_num_shift) - 1)
|
|
720
726
|
|
|
721
|
-
block
|
|
727
|
+
if (block := self.blocks[primary_num]) == 0:
|
|
728
|
+
return 0
|
|
722
729
|
|
|
723
730
|
# Pointer block data can be stored in the .pbc.sf file itself, in .sbc.sf or as regular file block
|
|
724
731
|
# Use the address type to figure it out
|
|
@@ -730,10 +737,12 @@ class FileDescriptor6(FileDescriptor):
|
|
|
730
737
|
secondary_num = (block_num >> self.vmfs._ptr_block_num_shift) & ((1 << self.vmfs._ptr_block_num_shift) - 1)
|
|
731
738
|
tertiary_num = block_num & ((1 << self.vmfs._ptr_block_num_shift) - 1)
|
|
732
739
|
|
|
733
|
-
block
|
|
740
|
+
if (block := self.blocks[primary_num]) == 0:
|
|
741
|
+
return 0
|
|
734
742
|
pb_buf = self.vmfs.resources.read(block)
|
|
735
743
|
|
|
736
|
-
block
|
|
744
|
+
if (block := _get_uint64_index(pb_buf, secondary_num)) == 0:
|
|
745
|
+
return 0
|
|
737
746
|
pb_buf = self.vmfs.resources.read(block)
|
|
738
747
|
|
|
739
748
|
return _get_uint64_index(pb_buf, tertiary_num)
|
|
@@ -751,7 +760,9 @@ class FileDescriptor6(FileDescriptor):
|
|
|
751
760
|
if self.zla == FS3_ZeroLevelAddrType.FILE_DESCRIPTOR_RESIDENT:
|
|
752
761
|
return self._resolve_resident_offset(offset), 0
|
|
753
762
|
|
|
754
|
-
block
|
|
763
|
+
if (block := self._offset_to_block_address(offset)) == 0:
|
|
764
|
+
# Return early with a TBZ set for 0 blocks
|
|
765
|
+
return 0, 0xFF
|
|
755
766
|
type = address_type(block)
|
|
756
767
|
|
|
757
768
|
if resource := self.vmfs.resources.get(type):
|
|
@@ -970,7 +981,7 @@ class BlockStream(AlignedStream):
|
|
|
970
981
|
Eventual file blocks can also differ between FB (filesystem block), SB (sub/small block) and
|
|
971
982
|
LFB (large filesystem block).
|
|
972
983
|
|
|
973
|
-
See :func:`
|
|
984
|
+
See :func:`FileDescriptor5._resolve_offset` and :func:`FileDescriptor6._resolve_offset` for more information on how
|
|
974
985
|
to resolve offsets.
|
|
975
986
|
"""
|
|
976
987
|
|
|
@@ -367,7 +367,9 @@ class ResourceManager:
|
|
|
367
367
|
self.resources = {}
|
|
368
368
|
|
|
369
369
|
def __repr__(self) -> str:
|
|
370
|
-
return
|
|
370
|
+
return (
|
|
371
|
+
f"<ResourceManager {' '.join(RESOURCE_TYPE_ABBREVIATIONS[FS3_ResourceTypeID(r)] for r in self.resources)}>"
|
|
372
|
+
)
|
|
371
373
|
|
|
372
374
|
def __getitem__(self, type: FS3_ResourceTypeID | int) -> ResourceFile:
|
|
373
375
|
"""Get a resource file by its type."""
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dissect.vmfs
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.13
|
|
4
4
|
Summary: A Dissect module implementing a parser for the VMFS file system, used by VMware virtualization software
|
|
5
5
|
Author-email: Dissect Team <dissect@fox-it.com>
|
|
6
|
-
License:
|
|
6
|
+
License-Expression: AGPL-3.0-or-later
|
|
7
7
|
Project-URL: homepage, https://dissect.tools
|
|
8
8
|
Project-URL: documentation, https://docs.dissect.tools/en/latest/projects/dissect.vmfs
|
|
9
9
|
Project-URL: repository, https://github.com/fox-it/dissect.vmfs
|
|
@@ -11,14 +11,13 @@ Classifier: Development Status :: 5 - Production/Stable
|
|
|
11
11
|
Classifier: Environment :: Console
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Intended Audience :: Information Technology
|
|
14
|
-
Classifier: License :: OSI Approved
|
|
15
14
|
Classifier: Operating System :: OS Independent
|
|
16
15
|
Classifier: Programming Language :: Python :: 3
|
|
17
16
|
Classifier: Topic :: Internet :: Log Analysis
|
|
18
17
|
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
19
18
|
Classifier: Topic :: Security
|
|
20
19
|
Classifier: Topic :: Utilities
|
|
21
|
-
Requires-Python:
|
|
20
|
+
Requires-Python: >=3.10
|
|
22
21
|
Description-Content-Type: text/markdown
|
|
23
22
|
License-File: LICENSE
|
|
24
23
|
License-File: COPYRIGHT
|
|
@@ -54,6 +54,8 @@ tests/_data/vmfs/vmfs6.bin.gz
|
|
|
54
54
|
tests/_data/vmfs/vmfs6d.bin.gz
|
|
55
55
|
tests/_data/vmfs/vmfs6l.bin.gz
|
|
56
56
|
tests/_data/vmfs/vmfs6ld.bin.gz
|
|
57
|
+
tests/_data/vmfs/zero5.bin.gz
|
|
58
|
+
tests/_data/vmfs/zero6.bin.gz
|
|
57
59
|
tests/_data/vmfs/span/vmfs5-span-0.bin.gz
|
|
58
60
|
tests/_data/vmfs/span/vmfs5-span-1.bin.gz
|
|
59
61
|
tests/_data/vmfs/span/vmfs6-span-0.bin.gz
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools>=
|
|
2
|
+
requires = ["setuptools>=77.0.0", "setuptools_scm[toml]>=6.4.0"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dissect.vmfs"
|
|
7
7
|
description = "A Dissect module implementing a parser for the VMFS file system, used by VMware virtualization software"
|
|
8
8
|
readme = "README.md"
|
|
9
|
-
requires-python = "
|
|
10
|
-
license
|
|
9
|
+
requires-python = ">=3.10"
|
|
10
|
+
license = "AGPL-3.0-or-later"
|
|
11
|
+
license-files = ["LICENSE", "COPYRIGHT"]
|
|
11
12
|
authors = [
|
|
12
13
|
{name = "Dissect Team", email = "dissect@fox-it.com"}
|
|
13
14
|
]
|
|
@@ -16,7 +17,6 @@ classifiers = [
|
|
|
16
17
|
"Environment :: Console",
|
|
17
18
|
"Intended Audience :: Developers",
|
|
18
19
|
"Intended Audience :: Information Technology",
|
|
19
|
-
"License :: OSI Approved",
|
|
20
20
|
"Operating System :: OS Independent",
|
|
21
21
|
"Programming Language :: Python :: 3",
|
|
22
22
|
"Topic :: Internet :: Log Analysis",
|
|
@@ -41,9 +41,29 @@ dev = [
|
|
|
41
41
|
"dissect.util>=3.0.dev,<4.0.dev",
|
|
42
42
|
]
|
|
43
43
|
|
|
44
|
+
[dependency-groups]
|
|
45
|
+
test = [
|
|
46
|
+
"pytest",
|
|
47
|
+
]
|
|
48
|
+
lint = [
|
|
49
|
+
"ruff==0.13.1",
|
|
50
|
+
"vermin",
|
|
51
|
+
]
|
|
52
|
+
build = [
|
|
53
|
+
"build",
|
|
54
|
+
]
|
|
55
|
+
debug = [
|
|
56
|
+
"ipdb",
|
|
57
|
+
]
|
|
58
|
+
dev = [
|
|
59
|
+
{include-group = "test"},
|
|
60
|
+
{include-group = "lint"},
|
|
61
|
+
{include-group = "debug"},
|
|
62
|
+
]
|
|
63
|
+
|
|
44
64
|
[tool.ruff]
|
|
45
65
|
line-length = 120
|
|
46
|
-
required-version = ">=0.
|
|
66
|
+
required-version = ">=0.13.1"
|
|
47
67
|
|
|
48
68
|
[tool.ruff.format]
|
|
49
69
|
docstring-code-format = true
|
|
@@ -93,11 +113,7 @@ ignore = ["E203", "B904", "UP024", "ANN002", "ANN003", "ANN204", "ANN401", "SIM1
|
|
|
93
113
|
known-first-party = ["dissect.vmfs"]
|
|
94
114
|
known-third-party = ["dissect"]
|
|
95
115
|
|
|
96
|
-
[tool.setuptools]
|
|
97
|
-
license-files = ["LICENSE", "COPYRIGHT"]
|
|
98
|
-
|
|
99
116
|
[tool.setuptools.packages.find]
|
|
100
117
|
include = ["dissect.*"]
|
|
101
118
|
|
|
102
119
|
[tool.setuptools_scm]
|
|
103
|
-
local_scheme = "no-local-version"
|
|
Binary file
|
|
Binary file
|
|
@@ -233,3 +233,21 @@ def _assert_is_file(fd: vmfs.FileDescriptor, size: int, zla: FS3_ZeroLevelAddrTy
|
|
|
233
233
|
assert stat.S_ISREG(fd.mode)
|
|
234
234
|
assert fd.size == size
|
|
235
235
|
assert fd.zla == zla
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
@pytest.mark.parametrize(
|
|
239
|
+
("path"),
|
|
240
|
+
[
|
|
241
|
+
pytest.param("vmfs/zero5.bin.gz", id="vmfs5"),
|
|
242
|
+
pytest.param("vmfs/zero6.bin.gz", id="vmfs6"),
|
|
243
|
+
],
|
|
244
|
+
)
|
|
245
|
+
def test_sparse(path: str) -> None:
|
|
246
|
+
"""Test that an empty disk but with a valid ZLA is correctly interpreted as sparse."""
|
|
247
|
+
with gzip.open(absolute_path(f"_data/{path}"), "rb") as fh:
|
|
248
|
+
vs = lvm.LVM(fh)
|
|
249
|
+
fs = vmfs.VMFS(vs.volumes[0].open())
|
|
250
|
+
|
|
251
|
+
fd = fs.get("empty-flat.vmdk")
|
|
252
|
+
assert fd.zla == FS3_ZeroLevelAddrType.POINTER_BLOCK
|
|
253
|
+
assert fd.open().read(512) == b"\x00" * 512
|
|
@@ -4,7 +4,7 @@ envlist = lint, py3, pypy3
|
|
|
4
4
|
# requires if they are not available on the host system. This requires the
|
|
5
5
|
# locally installed tox to have a minimum version 3.3.0. This means the names
|
|
6
6
|
# of the configuration options are still according to the tox 3.x syntax.
|
|
7
|
-
minversion = 4.
|
|
7
|
+
minversion = 4.27.0
|
|
8
8
|
# This version of virtualenv will install setuptools version 68.2.2 and pip
|
|
9
9
|
# 23.3.1. These versions fully support python projects defined only through a
|
|
10
10
|
# pyproject.toml file (PEP-517/PEP-518/PEP-621). This pip version also support
|
|
@@ -14,9 +14,9 @@ requires = virtualenv>=20.24.6
|
|
|
14
14
|
[testenv]
|
|
15
15
|
extras = dev
|
|
16
16
|
deps =
|
|
17
|
-
pytest
|
|
18
17
|
pytest-cov
|
|
19
18
|
coverage
|
|
19
|
+
dependency_groups = test
|
|
20
20
|
commands =
|
|
21
21
|
pytest --basetemp="{envtmpdir}" {posargs:--color=yes --cov=dissect --cov-report=term-missing -v tests}
|
|
22
22
|
coverage report
|
|
@@ -24,26 +24,24 @@ commands =
|
|
|
24
24
|
|
|
25
25
|
[testenv:build]
|
|
26
26
|
package = skip
|
|
27
|
-
|
|
28
|
-
build
|
|
27
|
+
dependency_groups = build
|
|
29
28
|
commands =
|
|
30
29
|
pyproject-build
|
|
31
30
|
|
|
32
31
|
[testenv:fix]
|
|
33
32
|
package = skip
|
|
34
|
-
|
|
35
|
-
ruff==0.12.1
|
|
33
|
+
dependency_groups = lint
|
|
36
34
|
commands =
|
|
35
|
+
ruff check --fix dissect tests
|
|
37
36
|
ruff format dissect tests
|
|
38
37
|
|
|
39
38
|
[testenv:lint]
|
|
40
39
|
package = skip
|
|
41
|
-
|
|
42
|
-
ruff==0.12.1
|
|
43
|
-
vermin
|
|
40
|
+
dependency_groups = lint
|
|
44
41
|
commands =
|
|
45
42
|
ruff check dissect tests
|
|
46
|
-
|
|
43
|
+
ruff format --check dissect tests
|
|
44
|
+
vermin -t=3.10- --no-tips --lint dissect tests
|
|
47
45
|
|
|
48
46
|
[testenv:docs-build]
|
|
49
47
|
allowlist_externals = make
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/vmfs5-resource-optimized.bin.gz
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dissect_vmfs-3.12.dev2 → dissect_vmfs-3.13}/tests/_data/vmfs/vmfs6-resource-optimized.bin.gz
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|