dissect.vmfs 3.14.dev2__tar.gz → 3.14.dev4__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.14.dev2/dissect.vmfs.egg-info → dissect_vmfs-3.14.dev4}/PKG-INFO +3 -3
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect/vmfs/c_lvm.pyi +27 -11
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect/vmfs/c_vmfs.pyi +25 -32
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect/vmfs/vmfs.py +19 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4/dissect.vmfs.egg-info}/PKG-INFO +3 -3
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect.vmfs.egg-info/SOURCES.txt +2 -0
- dissect_vmfs-3.14.dev4/dissect.vmfs.egg-info/requires.txt +6 -0
- dissect_vmfs-3.14.dev4/dissect.vmfs.egg-info/scm_file_list.json +67 -0
- dissect_vmfs-3.14.dev4/dissect.vmfs.egg-info/scm_version.json +8 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/pyproject.toml +2 -2
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/tests/test_vmfs.py +32 -0
- dissect_vmfs-3.14.dev2/dissect.vmfs.egg-info/requires.txt +0 -6
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/COPYRIGHT +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/LICENSE +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/MANIFEST.in +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/README.md +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect/vmfs/__init__.py +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect/vmfs/address.py +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect/vmfs/c_lvm.py +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect/vmfs/c_vmfs.py +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect/vmfs/descriptor.py +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect/vmfs/exception.py +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect/vmfs/lvm.py +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect/vmfs/resource.py +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect/vmfs/util.py +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect.vmfs.egg-info/dependency_links.txt +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/dissect.vmfs.egg-info/top_level.txt +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/setup.cfg +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/tests/__init__.py +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/tests/_docs/Makefile +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/tests/_docs/conf.py +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/tests/_docs/index.rst +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/tests/conftest.py +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/tests/test_exception.py +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/tests/test_lvm.py +0 -0
- {dissect_vmfs-3.14.dev2 → dissect_vmfs-3.14.dev4}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dissect.vmfs
|
|
3
|
-
Version: 3.14.
|
|
3
|
+
Version: 3.14.dev4
|
|
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
6
|
License-Expression: AGPL-3.0-or-later
|
|
@@ -21,10 +21,10 @@ Requires-Python: >=3.10
|
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
License-File: COPYRIGHT
|
|
24
|
-
Requires-Dist: dissect.cstruct<5
|
|
24
|
+
Requires-Dist: dissect.cstruct<6,>=5.0.dev
|
|
25
25
|
Requires-Dist: dissect.util<4,>=3
|
|
26
26
|
Provides-Extra: dev
|
|
27
|
-
Requires-Dist: dissect.cstruct<
|
|
27
|
+
Requires-Dist: dissect.cstruct<6.0.dev,>=5.0.dev; extra == "dev"
|
|
28
28
|
Requires-Dist: dissect.util<4.0.dev,>=3.0.dev; extra == "dev"
|
|
29
29
|
Dynamic: license-file
|
|
30
30
|
|
|
@@ -10,14 +10,17 @@ class _c_lvm(__cs__.cstruct):
|
|
|
10
10
|
LVM_INITIAL_MAJOR_VERSION: Literal[3] = ...
|
|
11
11
|
LVM_MAJOR_VERSION_ESX60: Literal[6] = ...
|
|
12
12
|
LVM_MAJOR_VERSION_ESX50: Literal[5] = ...
|
|
13
|
-
LVM_IS_LVM6: Literal["((majorVersion == LVM_MAJOR_VERSION_ESX60) ? TRUE : FALSE)"] = ...
|
|
13
|
+
LVM_IS_LVM6: Literal["(majorVersion)((majorVersion == LVM_MAJOR_VERSION_ESX60) ? TRUE : FALSE)"] = ...
|
|
14
14
|
LVM_DEV_HEADER_OFFSET: Literal[1048576] = ...
|
|
15
15
|
LVM_MD_ALIGNMENT_DEFAULT: Literal[4096] = ...
|
|
16
16
|
LVM_MAX_VOLUME_LABEL_LENGTH: Literal[64] = ...
|
|
17
17
|
LVM_SIZEOF_LVM_DEVMETA_LVM5: Literal[512] = ...
|
|
18
|
-
LVM_SIZEOF_LVM_DEVMETA_LVM6: Literal["(mdAlignment)"] = ...
|
|
18
|
+
LVM_SIZEOF_LVM_DEVMETA_LVM6: Literal["(mdAlignment) (mdAlignment)"] = ...
|
|
19
19
|
LVM_SIZEOF_LVM_DEVMETA: Literal[
|
|
20
|
-
|
|
20
|
+
(
|
|
21
|
+
"(majorVersion,mdAlignment)"
|
|
22
|
+
"(LVM_IS_LVM6(majorVersion) ? LVM_SIZEOF_LVM_DEVMETA_LVM6(mdAlignment) : LVM_SIZEOF_LVM_DEVMETA_LVM5)"
|
|
23
|
+
)
|
|
21
24
|
] = ...
|
|
22
25
|
LVM_SIZEOF_EXTVOLMETA: Literal[256] = ...
|
|
23
26
|
LVM_SIZEOF_VTENTRY: Literal[512] = ...
|
|
@@ -26,7 +29,7 @@ class _c_lvm(__cs__.cstruct):
|
|
|
26
29
|
LVM_MAX_VOLUMES_PER_DEV_LVM5: Literal[512] = ...
|
|
27
30
|
LVM_MAX_VOLUMES_PER_DEV_LVM6: Literal[1] = ...
|
|
28
31
|
LVM_MAX_VOLUMES_PER_DEV: Literal[
|
|
29
|
-
"(LVM_IS_LVM6(majorVersion) ? LVM_MAX_VOLUMES_PER_DEV_LVM6 : LVM_MAX_VOLUMES_PER_DEV_LVM5)"
|
|
32
|
+
"(majorVersion) (LVM_IS_LVM6(majorVersion) ? LVM_MAX_VOLUMES_PER_DEV_LVM6 : LVM_MAX_VOLUMES_PER_DEV_LVM5)"
|
|
30
33
|
] = ...
|
|
31
34
|
LVM_UNUSED_MD_SECTORS_LVM5: Literal[512] = ...
|
|
32
35
|
LVM_UNUSED_MD_SECTORS_LVM6: Literal[1023] = ...
|
|
@@ -34,12 +37,17 @@ class _c_lvm(__cs__.cstruct):
|
|
|
34
37
|
LVM_UNUSED_MD_SIZE_LVM6: Literal[523776] = ...
|
|
35
38
|
LVM_RESERVED_SIZE_LVM5: Literal[253952] = ...
|
|
36
39
|
LVM_RESERVED_SIZE_LVM6: Literal[515584] = ...
|
|
37
|
-
LVM_RESERVED_SIZE: Literal[
|
|
40
|
+
LVM_RESERVED_SIZE: Literal[
|
|
41
|
+
"(majorVersion) (LVM_IS_LVM6(majorVersion) ? LVM_RESERVED_SIZE_LVM6 : LVM_RESERVED_SIZE_LVM5)"
|
|
42
|
+
] = ...
|
|
38
43
|
LVM_PES_PER_BITMAP: Literal[8192] = ...
|
|
39
44
|
LVM_PE_BITMAP_SIZE_LVM5: Literal[1024] = ...
|
|
40
|
-
LVM_PE_BITMAP_SIZE_LVM6: Literal["(MAX(mdAlignment, LVM_PE_BITMAP_SIZE_LVM5))"] = ...
|
|
45
|
+
LVM_PE_BITMAP_SIZE_LVM6: Literal["(mdAlignment) (MAX(mdAlignment, LVM_PE_BITMAP_SIZE_LVM5))"] = ...
|
|
41
46
|
LVM_PE_BITMAP_SIZE: Literal[
|
|
42
|
-
|
|
47
|
+
(
|
|
48
|
+
"(majorVersion,mdAlignment)"
|
|
49
|
+
"(LVM_IS_LVM6(majorVersion) ? LVM_PE_BITMAP_SIZE_LVM6(mdAlignment) : LVM_PE_BITMAP_SIZE_LVM5)"
|
|
50
|
+
)
|
|
43
51
|
] = ...
|
|
44
52
|
Bool: TypeAlias = _c_lvm.uint8
|
|
45
53
|
class LVM_VolState(__cs__.Enum):
|
|
@@ -57,6 +65,7 @@ class _c_lvm(__cs__.cstruct):
|
|
|
57
65
|
@overload
|
|
58
66
|
def __init__(
|
|
59
67
|
self,
|
|
68
|
+
/,
|
|
60
69
|
timeLo: _c_lvm.uint32 | None = ...,
|
|
61
70
|
timeHi: _c_lvm.uint32 | None = ...,
|
|
62
71
|
rand: _c_lvm.uint16 | None = ...,
|
|
@@ -78,6 +87,7 @@ class _c_lvm(__cs__.cstruct):
|
|
|
78
87
|
@overload
|
|
79
88
|
def __init__(
|
|
80
89
|
self,
|
|
90
|
+
/,
|
|
81
91
|
type: _c_lvm.uint8 | None = ...,
|
|
82
92
|
len: _c_lvm.uint8 | None = ...,
|
|
83
93
|
lun: _c_lvm.uint16 | None = ...,
|
|
@@ -117,6 +127,7 @@ class _c_lvm(__cs__.cstruct):
|
|
|
117
127
|
@overload
|
|
118
128
|
def __init__(
|
|
119
129
|
self,
|
|
130
|
+
/,
|
|
120
131
|
magic: _c_lvm.uint32 | None = ...,
|
|
121
132
|
majorVersion: _c_lvm.uint32 | None = ...,
|
|
122
133
|
minorVersion: _c_lvm.uint32 | None = ...,
|
|
@@ -151,6 +162,7 @@ class _c_lvm(__cs__.cstruct):
|
|
|
151
162
|
@overload
|
|
152
163
|
def __init__(
|
|
153
164
|
self,
|
|
165
|
+
/,
|
|
154
166
|
magic: _c_lvm.uint32 | None = ...,
|
|
155
167
|
numPEMaps: _c_lvm.uint32 | None = ...,
|
|
156
168
|
dataOffset: _c_lvm.uint64 | None = ...,
|
|
@@ -163,7 +175,7 @@ class _c_lvm(__cs__.cstruct):
|
|
|
163
175
|
uuid: _c_lvm.UUID
|
|
164
176
|
snapID: _c_lvm.uint32
|
|
165
177
|
@overload
|
|
166
|
-
def __init__(self, uuid: _c_lvm.UUID | None = ..., snapID: _c_lvm.uint32 | None = ...): ...
|
|
178
|
+
def __init__(self, /, uuid: _c_lvm.UUID | None = ..., snapID: _c_lvm.uint32 | None = ...): ...
|
|
167
179
|
@overload
|
|
168
180
|
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
169
181
|
|
|
@@ -177,6 +189,7 @@ class _c_lvm(__cs__.cstruct):
|
|
|
177
189
|
@overload
|
|
178
190
|
def __init__(
|
|
179
191
|
self,
|
|
192
|
+
/,
|
|
180
193
|
logicalSize: _c_lvm.uint64 | None = ...,
|
|
181
194
|
generation: _c_lvm.uint64 | None = ...,
|
|
182
195
|
state: _c_lvm.LVM_VolState | None = ...,
|
|
@@ -194,6 +207,7 @@ class _c_lvm(__cs__.cstruct):
|
|
|
194
207
|
@overload
|
|
195
208
|
def __init__(
|
|
196
209
|
self,
|
|
210
|
+
/,
|
|
197
211
|
numDevs: _c_lvm.uint32 | None = ...,
|
|
198
212
|
pad: __cs__.CharArray | None = ...,
|
|
199
213
|
consumedPEs: _c_lvm.uint32 | None = ...,
|
|
@@ -213,6 +227,7 @@ class _c_lvm(__cs__.cstruct):
|
|
|
213
227
|
@overload
|
|
214
228
|
def __init__(
|
|
215
229
|
self,
|
|
230
|
+
/,
|
|
216
231
|
volMeta: _c_lvm.LVM_VolMetadata | None = ...,
|
|
217
232
|
volumeID: _c_lvm.uint32 | None = ...,
|
|
218
233
|
numPEs: _c_lvm.uint32 | None = ...,
|
|
@@ -228,7 +243,7 @@ class _c_lvm(__cs__.cstruct):
|
|
|
228
243
|
class LVM_VolTableEntry(__cs__.Structure):
|
|
229
244
|
volDesc: _c_lvm.LVM_VolDescriptor
|
|
230
245
|
@overload
|
|
231
|
-
def __init__(self, volDesc: _c_lvm.LVM_VolDescriptor | None = ...): ...
|
|
246
|
+
def __init__(self, /, volDesc: _c_lvm.LVM_VolDescriptor | None = ...): ...
|
|
232
247
|
@overload
|
|
233
248
|
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
234
249
|
|
|
@@ -242,6 +257,7 @@ class _c_lvm(__cs__.cstruct):
|
|
|
242
257
|
@overload
|
|
243
258
|
def __init__(
|
|
244
259
|
self,
|
|
260
|
+
/,
|
|
245
261
|
peID: _c_lvm.uint32 | None = ...,
|
|
246
262
|
volumeID: _c_lvm.uint32 | None = ...,
|
|
247
263
|
pOffset: _c_lvm.uint64 | None = ...,
|
|
@@ -256,14 +272,14 @@ class _c_lvm(__cs__.cstruct):
|
|
|
256
272
|
used: _c_lvm.uint8
|
|
257
273
|
peDesc: _c_lvm.LVM_PEDescriptor
|
|
258
274
|
@overload
|
|
259
|
-
def __init__(self, used: _c_lvm.uint8 | None = ..., peDesc: _c_lvm.LVM_PEDescriptor | None = ...): ...
|
|
275
|
+
def __init__(self, /, used: _c_lvm.uint8 | None = ..., peDesc: _c_lvm.LVM_PEDescriptor | None = ...): ...
|
|
260
276
|
@overload
|
|
261
277
|
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
262
278
|
|
|
263
279
|
class LVM_SDTableEntry(__cs__.Structure):
|
|
264
280
|
deviceName: __cs__.CharArray
|
|
265
281
|
@overload
|
|
266
|
-
def __init__(self, deviceName: __cs__.CharArray | None = ...): ...
|
|
282
|
+
def __init__(self, /, deviceName: __cs__.CharArray | None = ...): ...
|
|
267
283
|
@overload
|
|
268
284
|
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
269
285
|
|
|
@@ -41,6 +41,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
41
41
|
@overload
|
|
42
42
|
def __init__(
|
|
43
43
|
self,
|
|
44
|
+
/,
|
|
44
45
|
timeLo: _c_vmfs.uint32 | None = ...,
|
|
45
46
|
timeHi: _c_vmfs.uint32 | None = ...,
|
|
46
47
|
rand: _c_vmfs.uint16 | None = ...,
|
|
@@ -62,6 +63,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
62
63
|
@overload
|
|
63
64
|
def __init__(
|
|
64
65
|
self,
|
|
66
|
+
/,
|
|
65
67
|
type: _c_vmfs.uint8 | None = ...,
|
|
66
68
|
len: _c_vmfs.uint8 | None = ...,
|
|
67
69
|
lun: _c_vmfs.uint16 | None = ...,
|
|
@@ -81,7 +83,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
81
83
|
class FS3_VolAddress(__cs__.Structure):
|
|
82
84
|
offset: _c_vmfs.uint64
|
|
83
85
|
@overload
|
|
84
|
-
def __init__(self, offset: _c_vmfs.uint64 | None = ...): ...
|
|
86
|
+
def __init__(self, /, offset: _c_vmfs.uint64 | None = ...): ...
|
|
85
87
|
@overload
|
|
86
88
|
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
87
89
|
|
|
@@ -136,7 +138,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
136
138
|
class FDS_VolInfo(__cs__.Structure):
|
|
137
139
|
id: __cs__.CharArray
|
|
138
140
|
@overload
|
|
139
|
-
def __init__(self, id: __cs__.CharArray | None = ...): ...
|
|
141
|
+
def __init__(self, /, id: __cs__.CharArray | None = ...): ...
|
|
140
142
|
@overload
|
|
141
143
|
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
142
144
|
|
|
@@ -144,7 +146,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
144
146
|
value: _c_vmfs.uint64
|
|
145
147
|
checksumGen: _c_vmfs.uint64
|
|
146
148
|
@overload
|
|
147
|
-
def __init__(self, value: _c_vmfs.uint64 | None = ..., checksumGen: _c_vmfs.uint64 | None = ...): ...
|
|
149
|
+
def __init__(self, /, value: _c_vmfs.uint64 | None = ..., checksumGen: _c_vmfs.uint64 | None = ...): ...
|
|
148
150
|
@overload
|
|
149
151
|
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
150
152
|
|
|
@@ -206,6 +208,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
206
208
|
@overload
|
|
207
209
|
def __init__(
|
|
208
210
|
self,
|
|
211
|
+
/,
|
|
209
212
|
magic: _c_vmfs.uint32 | None = ...,
|
|
210
213
|
majorVersion: _c_vmfs.uint32 | None = ...,
|
|
211
214
|
minorVersion: _c_vmfs.uint8 | None = ...,
|
|
@@ -295,6 +298,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
295
298
|
@overload
|
|
296
299
|
def __init__(
|
|
297
300
|
self,
|
|
301
|
+
/,
|
|
298
302
|
resourcesPerCluster: _c_vmfs.uint32 | None = ...,
|
|
299
303
|
clustersPerGroup: _c_vmfs.uint32 | None = ...,
|
|
300
304
|
clusterGroupOffset: _c_vmfs.uint32 | None = ...,
|
|
@@ -330,6 +334,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
330
334
|
@overload
|
|
331
335
|
def __init__(
|
|
332
336
|
self,
|
|
337
|
+
/,
|
|
333
338
|
clusterNum: _c_vmfs.uint32 | None = ...,
|
|
334
339
|
totalResources: _c_vmfs.uint32 | None = ...,
|
|
335
340
|
freeResources: _c_vmfs.uint32 | None = ...,
|
|
@@ -354,6 +359,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
354
359
|
@overload
|
|
355
360
|
def __init__(
|
|
356
361
|
self,
|
|
362
|
+
/,
|
|
357
363
|
_pad: __cs__.CharArray | None = ...,
|
|
358
364
|
signature: _c_vmfs.uint32 | None = ...,
|
|
359
365
|
priority: _c_vmfs.uint32 | None = ...,
|
|
@@ -370,7 +376,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
370
376
|
class FS3_HBGen(__cs__.Structure):
|
|
371
377
|
gen: _c_vmfs.uint64
|
|
372
378
|
@overload
|
|
373
|
-
def __init__(self, gen: _c_vmfs.uint64 | None = ...): ...
|
|
379
|
+
def __init__(self, /, gen: _c_vmfs.uint64 | None = ...): ...
|
|
374
380
|
@overload
|
|
375
381
|
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
376
382
|
|
|
@@ -381,6 +387,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
381
387
|
@overload
|
|
382
388
|
def __init__(
|
|
383
389
|
self,
|
|
390
|
+
/,
|
|
384
391
|
hbAddr: _c_vmfs.FS3_VolAddress | None = ...,
|
|
385
392
|
hbGen: _c_vmfs.FS3_HBGen | None = ...,
|
|
386
393
|
uid: _c_vmfs.UUID | None = ...,
|
|
@@ -398,21 +405,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
398
405
|
owner: _c_vmfs.UUID
|
|
399
406
|
mtime: _c_vmfs.uint64
|
|
400
407
|
numHolders: _c_vmfs.uint32
|
|
401
|
-
|
|
402
|
-
hbAddr: _c_vmfs.FS3_VolAddress
|
|
403
|
-
hbGen: _c_vmfs.FS3_HBGen
|
|
404
|
-
uid: _c_vmfs.UUID
|
|
405
|
-
@overload
|
|
406
|
-
def __init__(
|
|
407
|
-
self,
|
|
408
|
-
hbAddr: _c_vmfs.FS3_VolAddress | None = ...,
|
|
409
|
-
hbGen: _c_vmfs.FS3_HBGen | None = ...,
|
|
410
|
-
uid: _c_vmfs.UUID | None = ...,
|
|
411
|
-
): ...
|
|
412
|
-
@overload
|
|
413
|
-
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
414
|
-
|
|
415
|
-
holders: __cs__.Array[FS3_LockHolder]
|
|
408
|
+
holders: __cs__.Array[_c_vmfs.FS3_LockHolder]
|
|
416
409
|
_unk: __cs__.CharArray
|
|
417
410
|
gblNumHolders: _c_vmfs.uint32
|
|
418
411
|
gblGen: _c_vmfs.uint64
|
|
@@ -420,6 +413,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
420
413
|
@overload
|
|
421
414
|
def __init__(
|
|
422
415
|
self,
|
|
416
|
+
/,
|
|
423
417
|
type: _c_vmfs.uint32 | None = ...,
|
|
424
418
|
addr: _c_vmfs.FS3_VolAddress | None = ...,
|
|
425
419
|
hbAddr: _c_vmfs.FS3_VolAddress | None = ...,
|
|
@@ -429,7 +423,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
429
423
|
owner: _c_vmfs.UUID | None = ...,
|
|
430
424
|
mtime: _c_vmfs.uint64 | None = ...,
|
|
431
425
|
numHolders: _c_vmfs.uint32 | None = ...,
|
|
432
|
-
holders: __cs__.Array[FS3_LockHolder] | None = ...,
|
|
426
|
+
holders: __cs__.Array[_c_vmfs.FS3_LockHolder] | None = ...,
|
|
433
427
|
_unk: __cs__.CharArray | None = ...,
|
|
434
428
|
gblNumHolders: _c_vmfs.uint32 | None = ...,
|
|
435
429
|
gblGen: _c_vmfs.uint64 | None = ...,
|
|
@@ -457,6 +451,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
457
451
|
@overload
|
|
458
452
|
def __init__(
|
|
459
453
|
self,
|
|
454
|
+
/,
|
|
460
455
|
state: _c_vmfs.uint32 | None = ...,
|
|
461
456
|
addr: _c_vmfs.FS3_VolAddress | None = ...,
|
|
462
457
|
hbGen: _c_vmfs.FS3_HBGen | None = ...,
|
|
@@ -521,6 +516,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
521
516
|
@overload
|
|
522
517
|
def __init__(
|
|
523
518
|
self,
|
|
519
|
+
/,
|
|
524
520
|
descAddr: _c_vmfs.uint32 | None = ...,
|
|
525
521
|
generation: _c_vmfs.uint32 | None = ...,
|
|
526
522
|
linkCount: _c_vmfs.uint32 | None = ...,
|
|
@@ -569,7 +565,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
569
565
|
class FS3_RawDiskMap(__cs__.Structure):
|
|
570
566
|
diskId: _c_vmfs.SCSI_DiskId
|
|
571
567
|
@overload
|
|
572
|
-
def __init__(self, diskId: _c_vmfs.SCSI_DiskId | None = ...): ...
|
|
568
|
+
def __init__(self, /, diskId: _c_vmfs.SCSI_DiskId | None = ...): ...
|
|
573
569
|
@overload
|
|
574
570
|
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
575
571
|
|
|
@@ -581,6 +577,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
581
577
|
@overload
|
|
582
578
|
def __init__(
|
|
583
579
|
self,
|
|
580
|
+
/,
|
|
584
581
|
type: _c_vmfs.FS3_DescriptorType | None = ...,
|
|
585
582
|
descAddr: _c_vmfs.uint32 | None = ...,
|
|
586
583
|
generation: _c_vmfs.uint32 | None = ...,
|
|
@@ -606,6 +603,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
606
603
|
@overload
|
|
607
604
|
def __init__(
|
|
608
605
|
self,
|
|
606
|
+
/,
|
|
609
607
|
type: _c_vmfs.FS3_DescriptorType | None = ...,
|
|
610
608
|
address: _c_vmfs.uint32 | None = ...,
|
|
611
609
|
generation: _c_vmfs.uint32 | None = ...,
|
|
@@ -632,6 +630,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
632
630
|
@overload
|
|
633
631
|
def __init__(
|
|
634
632
|
self,
|
|
633
|
+
/,
|
|
635
634
|
version: _c_vmfs.uint32 | None = ...,
|
|
636
635
|
numEntries: _c_vmfs.uint32 | None = ...,
|
|
637
636
|
numAllocated: _c_vmfs.uint32 | None = ...,
|
|
@@ -655,6 +654,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
655
654
|
@overload
|
|
656
655
|
def __init__(
|
|
657
656
|
self,
|
|
657
|
+
/,
|
|
658
658
|
version: _c_vmfs.uint16 | None = ...,
|
|
659
659
|
type: _c_vmfs.uint16 | None = ...,
|
|
660
660
|
totalSlots: _c_vmfs.uint16 | None = ...,
|
|
@@ -668,7 +668,7 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
668
668
|
location: _c_vmfs.uint32
|
|
669
669
|
hash: _c_vmfs.uint16
|
|
670
670
|
@overload
|
|
671
|
-
def __init__(self, location: _c_vmfs.uint32 | None = ..., hash: _c_vmfs.uint16 | None = ...): ...
|
|
671
|
+
def __init__(self, /, location: _c_vmfs.uint32 | None = ..., hash: _c_vmfs.uint16 | None = ...): ...
|
|
672
672
|
@overload
|
|
673
673
|
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
674
674
|
|
|
@@ -678,26 +678,19 @@ class _c_vmfs(__cs__.cstruct):
|
|
|
678
678
|
freeLinks: _c_vmfs.uint8
|
|
679
679
|
nextFreeIdx: _c_vmfs.uint8
|
|
680
680
|
pad1: _c_vmfs.uint8
|
|
681
|
-
|
|
682
|
-
location: _c_vmfs.uint32
|
|
683
|
-
hash: _c_vmfs.uint16
|
|
684
|
-
@overload
|
|
685
|
-
def __init__(self, location: _c_vmfs.uint32 | None = ..., hash: _c_vmfs.uint16 | None = ...): ...
|
|
686
|
-
@overload
|
|
687
|
-
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
688
|
-
|
|
689
|
-
links: __cs__.Array[FS6_DirLink]
|
|
681
|
+
links: __cs__.Array[_c_vmfs.FS6_DirLink]
|
|
690
682
|
nextGroup: _c_vmfs.uint32
|
|
691
683
|
pad2: _c_vmfs.uint16
|
|
692
684
|
@overload
|
|
693
685
|
def __init__(
|
|
694
686
|
self,
|
|
687
|
+
/,
|
|
695
688
|
hashIndex: _c_vmfs.uint16 | None = ...,
|
|
696
689
|
totalLinks: _c_vmfs.uint8 | None = ...,
|
|
697
690
|
freeLinks: _c_vmfs.uint8 | None = ...,
|
|
698
691
|
nextFreeIdx: _c_vmfs.uint8 | None = ...,
|
|
699
692
|
pad1: _c_vmfs.uint8 | None = ...,
|
|
700
|
-
links: __cs__.Array[FS6_DirLink] | None = ...,
|
|
693
|
+
links: __cs__.Array[_c_vmfs.FS6_DirLink] | None = ...,
|
|
701
694
|
nextGroup: _c_vmfs.uint32 | None = ...,
|
|
702
695
|
pad2: _c_vmfs.uint16 | None = ...,
|
|
703
696
|
): ...
|
|
@@ -130,6 +130,8 @@ class VMFS:
|
|
|
130
130
|
self._ptr_block_max_ptrs_shift = bsf(self._ptr_block_max_ptrs)
|
|
131
131
|
self._ptr_block_num_ptrs = 1024
|
|
132
132
|
self._ptr_block_num_shift = bsf(self._ptr_block_num_ptrs)
|
|
133
|
+
# The resource type that pointer blocks are stored in
|
|
134
|
+
self._ptr_block_res_type = FS3_ResourceTypeID.PTR_BLOCK
|
|
133
135
|
|
|
134
136
|
self._sfb_size = 0
|
|
135
137
|
else:
|
|
@@ -159,6 +161,14 @@ class VMFS:
|
|
|
159
161
|
self._ptr_block_max_ptrs_shift = bsf(self._ptr_block_max_ptrs)
|
|
160
162
|
self._ptr_block_num_ptrs = 8192 if self.md_alignment < 0x10000 else self.md_alignment >> 3
|
|
161
163
|
self._ptr_block_num_shift = bsf(self._ptr_block_num_ptrs)
|
|
164
|
+
# The resource type that pointer blocks are stored in depends on the pointer block size
|
|
165
|
+
ptr_block_size = 1 << self.descriptor.ptrBlockShift
|
|
166
|
+
if ptr_block_size == self.file_block_size:
|
|
167
|
+
self._ptr_block_res_type = FS3_ResourceTypeID.FILE_BLOCK
|
|
168
|
+
elif self.file_block_size > 0x10000 and ptr_block_size == self.sub_block_size:
|
|
169
|
+
self._ptr_block_res_type = FS3_ResourceTypeID.SUB_BLOCK
|
|
170
|
+
else:
|
|
171
|
+
self._ptr_block_res_type = FS3_ResourceTypeID.PTR_BLOCK
|
|
162
172
|
|
|
163
173
|
# In VMFS6, file blocks (FB) are now called small file blocks (SFB)
|
|
164
174
|
# Instead of being a simple number for a block, they now consist of a cluster
|
|
@@ -205,6 +215,15 @@ class VMFS:
|
|
|
205
215
|
elif self.fh:
|
|
206
216
|
self.resources.open(FS3_ResourceTypeID.PTR_BLOCK, address=c_vmfs.pbcDescAddr)
|
|
207
217
|
|
|
218
|
+
# .sbc.sf is opened before .fbb.sf if pointer blocks are stored in sub-blocks
|
|
219
|
+
if self._ptr_block_res_type == FS3_ResourceTypeID.SUB_BLOCK and not self.resources.has(
|
|
220
|
+
FS3_ResourceTypeID.SUB_BLOCK
|
|
221
|
+
):
|
|
222
|
+
if sbc:
|
|
223
|
+
self.resources.open(FS3_ResourceTypeID.SUB_BLOCK, fileobj=sbc)
|
|
224
|
+
elif self.fh:
|
|
225
|
+
self.resources.open(FS3_ResourceTypeID.SUB_BLOCK, address=c_vmfs.sbDescAddr)
|
|
226
|
+
|
|
208
227
|
# .fbb.sf - file block bitmap(?).system file
|
|
209
228
|
# Contains allocation information for file blocks.
|
|
210
229
|
# On VMFS6, contains the large file block (LFB) bitmap, and the small file block (SFB) information is stored as
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dissect.vmfs
|
|
3
|
-
Version: 3.14.
|
|
3
|
+
Version: 3.14.dev4
|
|
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
6
|
License-Expression: AGPL-3.0-or-later
|
|
@@ -21,10 +21,10 @@ Requires-Python: >=3.10
|
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
License-File: COPYRIGHT
|
|
24
|
-
Requires-Dist: dissect.cstruct<5
|
|
24
|
+
Requires-Dist: dissect.cstruct<6,>=5.0.dev
|
|
25
25
|
Requires-Dist: dissect.util<4,>=3
|
|
26
26
|
Provides-Extra: dev
|
|
27
|
-
Requires-Dist: dissect.cstruct<
|
|
27
|
+
Requires-Dist: dissect.cstruct<6.0.dev,>=5.0.dev; extra == "dev"
|
|
28
28
|
Requires-Dist: dissect.util<4.0.dev,>=3.0.dev; extra == "dev"
|
|
29
29
|
Dynamic: license-file
|
|
30
30
|
|
|
@@ -8,6 +8,8 @@ dissect.vmfs.egg-info/PKG-INFO
|
|
|
8
8
|
dissect.vmfs.egg-info/SOURCES.txt
|
|
9
9
|
dissect.vmfs.egg-info/dependency_links.txt
|
|
10
10
|
dissect.vmfs.egg-info/requires.txt
|
|
11
|
+
dissect.vmfs.egg-info/scm_file_list.json
|
|
12
|
+
dissect.vmfs.egg-info/scm_version.json
|
|
11
13
|
dissect.vmfs.egg-info/top_level.txt
|
|
12
14
|
dissect/vmfs/__init__.py
|
|
13
15
|
dissect/vmfs/address.py
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": [
|
|
3
|
+
".git-blame-ignore-revs",
|
|
4
|
+
".gitattributes",
|
|
5
|
+
".github/pull_request_template.md",
|
|
6
|
+
".github/workflows/dissect-ci.yml",
|
|
7
|
+
".gitignore",
|
|
8
|
+
"COPYRIGHT",
|
|
9
|
+
"LICENSE",
|
|
10
|
+
"MANIFEST.in",
|
|
11
|
+
"README.md",
|
|
12
|
+
"dissect/vmfs/__init__.py",
|
|
13
|
+
"dissect/vmfs/address.py",
|
|
14
|
+
"dissect/vmfs/c_lvm.py",
|
|
15
|
+
"dissect/vmfs/c_lvm.pyi",
|
|
16
|
+
"dissect/vmfs/c_vmfs.py",
|
|
17
|
+
"dissect/vmfs/c_vmfs.pyi",
|
|
18
|
+
"dissect/vmfs/descriptor.py",
|
|
19
|
+
"dissect/vmfs/exception.py",
|
|
20
|
+
"dissect/vmfs/lvm.py",
|
|
21
|
+
"dissect/vmfs/resource.py",
|
|
22
|
+
"dissect/vmfs/util.py",
|
|
23
|
+
"dissect/vmfs/vmfs.py",
|
|
24
|
+
"pyproject.toml",
|
|
25
|
+
"tests/__init__.py",
|
|
26
|
+
"tests/_data/lvm/huge/lvm5.csv.gz",
|
|
27
|
+
"tests/_data/lvm/huge/lvm6.csv.gz",
|
|
28
|
+
"tests/_data/lvm/lvm3.bin.gz",
|
|
29
|
+
"tests/_data/lvm/lvm4.bin.gz",
|
|
30
|
+
"tests/_data/lvm/lvm5.bin.gz",
|
|
31
|
+
"tests/_data/lvm/lvm6.bin.gz",
|
|
32
|
+
"tests/_data/lvm/span/lvm3-span-0.bin.gz",
|
|
33
|
+
"tests/_data/lvm/span/lvm3-span-1.bin.gz",
|
|
34
|
+
"tests/_data/lvm/span/lvm4-span-0.bin.gz",
|
|
35
|
+
"tests/_data/lvm/span/lvm4-span-1.bin.gz",
|
|
36
|
+
"tests/_data/lvm/span/lvm5-span-0.bin.gz",
|
|
37
|
+
"tests/_data/lvm/span/lvm5-span-1.bin.gz",
|
|
38
|
+
"tests/_data/lvm/span/lvm6-span-0.bin.gz",
|
|
39
|
+
"tests/_data/lvm/span/lvm6-span-1.bin.gz",
|
|
40
|
+
"tests/_data/vmfs.bin.gz",
|
|
41
|
+
"tests/_data/vmfs/span/vmfs5-span-0.bin.gz",
|
|
42
|
+
"tests/_data/vmfs/span/vmfs5-span-1.bin.gz",
|
|
43
|
+
"tests/_data/vmfs/span/vmfs6-span-0.bin.gz",
|
|
44
|
+
"tests/_data/vmfs/span/vmfs6-span-1.bin.gz",
|
|
45
|
+
"tests/_data/vmfs/vmfs5-no-dense-sbpc.bin.gz",
|
|
46
|
+
"tests/_data/vmfs/vmfs5-resource-optimized.bin.gz",
|
|
47
|
+
"tests/_data/vmfs/vmfs5.bin.gz",
|
|
48
|
+
"tests/_data/vmfs/vmfs5d.bin.gz",
|
|
49
|
+
"tests/_data/vmfs/vmfs5l.bin.gz",
|
|
50
|
+
"tests/_data/vmfs/vmfs5ld.bin.gz",
|
|
51
|
+
"tests/_data/vmfs/vmfs6-resource-optimized.bin.gz",
|
|
52
|
+
"tests/_data/vmfs/vmfs6.bin.gz",
|
|
53
|
+
"tests/_data/vmfs/vmfs6d.bin.gz",
|
|
54
|
+
"tests/_data/vmfs/vmfs6l.bin.gz",
|
|
55
|
+
"tests/_data/vmfs/vmfs6ld.bin.gz",
|
|
56
|
+
"tests/_data/vmfs/zero5.bin.gz",
|
|
57
|
+
"tests/_data/vmfs/zero6.bin.gz",
|
|
58
|
+
"tests/_docs/Makefile",
|
|
59
|
+
"tests/_docs/conf.py",
|
|
60
|
+
"tests/_docs/index.rst",
|
|
61
|
+
"tests/conftest.py",
|
|
62
|
+
"tests/test_exception.py",
|
|
63
|
+
"tests/test_lvm.py",
|
|
64
|
+
"tests/test_vmfs.py",
|
|
65
|
+
"tox.ini"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
@@ -25,7 +25,7 @@ classifiers = [
|
|
|
25
25
|
"Topic :: Utilities",
|
|
26
26
|
]
|
|
27
27
|
dependencies = [
|
|
28
|
-
"dissect.cstruct>=
|
|
28
|
+
"dissect.cstruct>=5.0.dev,<6",
|
|
29
29
|
"dissect.util>=3,<4",
|
|
30
30
|
]
|
|
31
31
|
dynamic = ["version"]
|
|
@@ -37,7 +37,7 @@ repository = "https://github.com/fox-it/dissect.vmfs"
|
|
|
37
37
|
|
|
38
38
|
[project.optional-dependencies]
|
|
39
39
|
dev = [
|
|
40
|
-
"dissect.cstruct>=
|
|
40
|
+
"dissect.cstruct>=5.0.dev,<6.0.dev",
|
|
41
41
|
"dissect.util>=3.0.dev,<4.0.dev",
|
|
42
42
|
]
|
|
43
43
|
|
|
@@ -5,11 +5,13 @@ import gzip
|
|
|
5
5
|
import stat
|
|
6
6
|
|
|
7
7
|
import pytest
|
|
8
|
+
from dissect.util.stream import OverlayStream
|
|
8
9
|
|
|
9
10
|
from dissect.vmfs import lvm, vmfs
|
|
10
11
|
from dissect.vmfs.c_vmfs import FS3_Config, FS3_ZeroLevelAddrType, FS6_DirBlockType, c_vmfs
|
|
11
12
|
from dissect.vmfs.descriptor import _dir_hash_get_location, _dir_name_hash
|
|
12
13
|
from dissect.vmfs.exception import VolumeNotAvailableError
|
|
14
|
+
from dissect.vmfs.vmfs import _get_sfd_offset
|
|
13
15
|
from tests.conftest import absolute_path
|
|
14
16
|
|
|
15
17
|
|
|
@@ -223,6 +225,36 @@ def test_vmfs_jbosf() -> None:
|
|
|
223
225
|
assert fd.open().read() == b"tiny\n"
|
|
224
226
|
|
|
225
227
|
|
|
228
|
+
def test_vmfs6_fbb_pointer_block_in_sub_block() -> None:
|
|
229
|
+
"""Test opening a VMFS6 volume where ``.fbb.sf`` uses a pointer block that is stored in a sub-block."""
|
|
230
|
+
with gzip.open(absolute_path("_data/vmfs/vmfs6.bin.gz"), "rb") as fh:
|
|
231
|
+
volume = lvm.LVM(fh).volumes[0].open()
|
|
232
|
+
donor = vmfs.VMFS(volume)
|
|
233
|
+
|
|
234
|
+
# Move the block array of .fbb.sf into a pointer block, stored in the sub-block of the "directory" directory
|
|
235
|
+
fbb = donor._get_sfd(c_vmfs.fbbDescAddr)
|
|
236
|
+
sb = donor.get("directory").blocks[0]
|
|
237
|
+
|
|
238
|
+
num_ptrs = donor.sub_block_size // 8
|
|
239
|
+
ptr_block = c_vmfs.uint64[num_ptrs].dumps(list(fbb.blocks) + [0] * (num_ptrs - len(fbb.blocks)))
|
|
240
|
+
|
|
241
|
+
buf = bytearray(fbb.raw)
|
|
242
|
+
metadata = fbb.metadata
|
|
243
|
+
metadata.zeroLevelAddrType = FS3_ZeroLevelAddrType.POINTER_BLOCK
|
|
244
|
+
buf[donor._fd_meta_offset : donor._fd_meta_offset + len(metadata)] = bytes(metadata)
|
|
245
|
+
blocks = [sb] + [0] * (donor._fd_max_data_addrs - 1)
|
|
246
|
+
buf[donor._fd_data_addrs_offset :] = c_vmfs.uint64[donor._fd_max_data_addrs].dumps(blocks)
|
|
247
|
+
|
|
248
|
+
patched = OverlayStream(volume, volume.size)
|
|
249
|
+
patched.add(donor.resources.SB.resolve_address(sb), ptr_block)
|
|
250
|
+
patched.add(_get_sfd_offset(donor, c_vmfs.fbbDescAddr), bytes(buf))
|
|
251
|
+
fs = vmfs.VMFS(patched)
|
|
252
|
+
|
|
253
|
+
assert fs.get(".fbb.sf").zla == FS3_ZeroLevelAddrType.POINTER_BLOCK
|
|
254
|
+
assert bytes(fs.resources.LFB.metadata) == bytes(donor.resources.LFB.metadata)
|
|
255
|
+
assert bytes(fs.resources.SFB.metadata) == bytes(donor.resources.SFB.metadata)
|
|
256
|
+
|
|
257
|
+
|
|
226
258
|
def _assert_is_file(fd: vmfs.FileDescriptor, size: int, zla: FS3_ZeroLevelAddrType) -> None:
|
|
227
259
|
"""Assert that the file descriptor is a file with the given size and ZLA."""
|
|
228
260
|
assert not fd.is_dir()
|
|
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.14.dev2 → dissect_vmfs-3.14.dev4}/dissect.vmfs.egg-info/dependency_links.txt
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
|