dissect.vmfs 3.14.dev1__py3-none-any.whl → 3.14.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/vmfs/__init__.py CHANGED
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  from dissect.vmfs.descriptor import DirEntry, FileDescriptor
2
4
  from dissect.vmfs.exception import (
3
5
  Error,
@@ -124,7 +124,6 @@ class FileDescriptor:
124
124
 
125
125
  Mimicks ``vmkfstool -D`` output.
126
126
  """
127
-
128
127
  fd = self.metadata
129
128
  li = self.lock_info
130
129
 
dissect/vmfs/exception.py CHANGED
@@ -1,3 +1,6 @@
1
+ from __future__ import annotations
2
+
3
+
1
4
  class Error(Exception):
2
5
  pass
3
6
 
dissect/vmfs/vmfs.py CHANGED
@@ -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.dev1
3
+ Version: 3.14.dev3
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
@@ -1,18 +1,18 @@
1
- dissect/vmfs/__init__.py,sha256=QXEd_WhRbWH0-qF5U_Rbom0PBwnNXCnTWw5rzgbFlNA,496
1
+ dissect/vmfs/__init__.py,sha256=fPoOccmzEbHAUe_a_HzRI5I9GMHU0ZixpOe-5HFnfh4,532
2
2
  dissect/vmfs/address.py,sha256=b1QcEl6cDWnJzTsR64UPl4PPpBnpkNHbZrGQp8gMdhY,24647
3
3
  dissect/vmfs/c_lvm.py,sha256=91TDxsXLuuQhrDkCuIfBp6Mk3swYvrvhQKYSDrd4NYw,8606
4
4
  dissect/vmfs/c_lvm.pyi,sha256=Chgo0n6wA35Dq736OH5eA1bJ3fKkIuxrWHqMf4n-1HI,10593
5
5
  dissect/vmfs/c_vmfs.py,sha256=ItKTgZbAo7RmUHqSAUm-9acXUmIb56byl4bGzuY8kc0,18643
6
6
  dissect/vmfs/c_vmfs.pyi,sha256=FA2G_Bhx9amexOObHwj8I8W2YdgVOnCP54TyK3y0FP4,27758
7
- dissect/vmfs/descriptor.py,sha256=aTbwvBHz7HR2pfqlbaFs_W-BINXV6LSQgTLrlTTqOBA,42956
8
- dissect/vmfs/exception.py,sha256=KhtE9LF_JEf-ILS_eK-7qC2mdYrv66JyEdVbjUXU1wQ,394
7
+ dissect/vmfs/descriptor.py,sha256=-kdatIV8Gj2vvw0wlXXNhDApIyYN3Vq6-1X7OF1DcM0,42955
8
+ dissect/vmfs/exception.py,sha256=fxrpKGVGTi7Ra9rioTwczNTzV-D41lCZAWJHWrK7EiQ,431
9
9
  dissect/vmfs/lvm.py,sha256=Szwip5li2tUktP4YG9g4JyTnq_y_i28LK28-3jsjivE,18028
10
10
  dissect/vmfs/resource.py,sha256=lQtYIUQiyW6R6H66HN7aEELpufQ5SSdDpYKXPPG-kCk,20020
11
11
  dissect/vmfs/util.py,sha256=zNMIsOGRIiWMCBnajZk60YdxOOLxUgvQ3Ck4PTCfbaY,923
12
- dissect/vmfs/vmfs.py,sha256=q7rfVScJ40Wt_zGTnFkXgS7g3xvOWTbTrUypE-M0GvI,16324
13
- dissect_vmfs-3.14.dev1.dist-info/licenses/COPYRIGHT,sha256=xRsH_sojCCOLf87tua-LfCu1_G8XAFtQnrF-iJ9ZImk,299
14
- dissect_vmfs-3.14.dev1.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
15
- dissect_vmfs-3.14.dev1.dist-info/METADATA,sha256=PshZpXXa88ym8rbMUB-osd-oSrQZbNO8Y5gaa2Z3PGs,3211
16
- dissect_vmfs-3.14.dev1.dist-info/WHEEL,sha256=YCfwYGOYMi5Jhw2fU4yNgwErybb2IX5PEwBKV4ZbdBo,91
17
- dissect_vmfs-3.14.dev1.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
18
- dissect_vmfs-3.14.dev1.dist-info/RECORD,,
12
+ dissect/vmfs/vmfs.py,sha256=SfdEeN_NkxKrN-U0g8LIddVLv32_o1WSmuWyDrtmO98,17456
13
+ dissect_vmfs-3.14.dev3.dist-info/licenses/COPYRIGHT,sha256=xRsH_sojCCOLf87tua-LfCu1_G8XAFtQnrF-iJ9ZImk,299
14
+ dissect_vmfs-3.14.dev3.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
15
+ dissect_vmfs-3.14.dev3.dist-info/METADATA,sha256=FYb20hpTOPoSvETPtK5SWIGr6FLvRHZ_buYv_esS93E,3211
16
+ dissect_vmfs-3.14.dev3.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
17
+ dissect_vmfs-3.14.dev3.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
18
+ dissect_vmfs-3.14.dev3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (82.0.0)
2
+ Generator: setuptools (84.2.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5