dissect.hypervisor 3.22.dev5__tar.gz → 3.22.dev6__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_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/PKG-INFO +3 -3
- dissect_hypervisor-3.22.dev6/dissect/hypervisor/descriptor/c_hyperv.pyi +183 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/c_asif.pyi +2 -0
- dissect_hypervisor-3.22.dev6/dissect/hypervisor/disk/c_hdd.pyi +92 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/c_qcow2.pyi +6 -2
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/c_vdi.pyi +3 -0
- dissect_hypervisor-3.22.dev6/dissect/hypervisor/disk/c_vhd.pyi +103 -0
- dissect_hypervisor-3.22.dev6/dissect/hypervisor/disk/c_vhdx.pyi +205 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/c_vmdk.py +3 -3
- dissect_hypervisor-3.22.dev6/dissect/hypervisor/disk/c_vmdk.pyi +210 -0
- dissect_hypervisor-3.22.dev6/dissect/hypervisor/util/c_envelope.py +46 -0
- dissect_hypervisor-3.22.dev6/dissect/hypervisor/util/c_envelope.pyi +76 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/util/envelope.py +1 -43
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect.hypervisor.egg-info/PKG-INFO +3 -3
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect.hypervisor.egg-info/SOURCES.txt +9 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect.hypervisor.egg-info/requires.txt +2 -2
- dissect_hypervisor-3.22.dev6/dissect.hypervisor.egg-info/scm_file_list.json +116 -0
- dissect_hypervisor-3.22.dev6/dissect.hypervisor.egg-info/scm_version.json +8 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/pyproject.toml +2 -2
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/.git-blame-ignore-revs +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/COPYRIGHT +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/LICENSE +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/MANIFEST.in +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/README.md +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/__init__.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/descriptor/__init__.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/descriptor/c_hyperv.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/descriptor/hyperv.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/descriptor/ovf.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/descriptor/pvs.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/descriptor/vbox.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/descriptor/vmx.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/__init__.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/asif.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/c_asif.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/c_hdd.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/c_qcow2.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/c_vdi.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/c_vhd.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/c_vhdx.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/hdd.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/qcow2.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/vdi.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/vhd.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/vhdx.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/vmdk.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/exceptions.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/tools/__init__.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/tools/envelope.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/tools/vmtar.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/util/__init__.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/util/vmtar.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect.hypervisor.egg-info/dependency_links.txt +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect.hypervisor.egg-info/entry_points.txt +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect.hypervisor.egg-info/top_level.txt +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/setup.cfg +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/__init__.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/_docs/Makefile +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/_docs/conf.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/_docs/index.rst +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/_tools/disk/vdi/generate.sh +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/_util.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/descriptor/__init__.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/descriptor/test_hyperv.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/descriptor/test_ovf.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/descriptor/test_pvs.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/descriptor/test_vbox.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/descriptor/test_vmx.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/disk/__init__.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/disk/test_asif.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/disk/test_hdd.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/disk/test_qcow2.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/disk/test_vdi.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/disk/test_vhd.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/disk/test_vhdx.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/disk/test_vmdk.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/util/__init__.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/util/test_envelope.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tests/util/test_vmtar.py +0 -0
- {dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dissect.hypervisor
|
|
3
|
-
Version: 3.22.
|
|
3
|
+
Version: 3.22.dev6
|
|
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-Expression: AGPL-3.0-or-later
|
|
@@ -22,14 +22,14 @@ Description-Content-Type: text/markdown
|
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
License-File: COPYRIGHT
|
|
24
24
|
Requires-Dist: defusedxml
|
|
25
|
-
Requires-Dist: dissect.cstruct<5
|
|
25
|
+
Requires-Dist: dissect.cstruct<6,>=5.0.dev
|
|
26
26
|
Requires-Dist: dissect.util<4,>=3
|
|
27
27
|
Provides-Extra: full
|
|
28
28
|
Requires-Dist: pycryptodome; extra == "full"
|
|
29
29
|
Requires-Dist: backports.zstd; python_version < "3.14" and extra == "full"
|
|
30
30
|
Provides-Extra: dev
|
|
31
31
|
Requires-Dist: dissect.hypervisor[full]; extra == "dev"
|
|
32
|
-
Requires-Dist: dissect.cstruct<
|
|
32
|
+
Requires-Dist: dissect.cstruct<6.0.dev,>=5.0.dev; extra == "dev"
|
|
33
33
|
Requires-Dist: dissect.util<4.0.dev,>=3.0.dev; extra == "dev"
|
|
34
34
|
Dynamic: license-file
|
|
35
35
|
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Generated by cstruct-stubgen
|
|
2
|
+
from typing import BinaryIO, Literal, TypeAlias, overload
|
|
3
|
+
|
|
4
|
+
import dissect.cstruct as __cs__
|
|
5
|
+
|
|
6
|
+
class _c_hyperv(__cs__.cstruct):
|
|
7
|
+
SIGNATURE_STORAGE_HEADER: Literal[19406868] = ...
|
|
8
|
+
FIRST_HEADER_OFFSET: Literal[0] = ...
|
|
9
|
+
SECOND_HEADER_OFFSET: Literal[4096] = ...
|
|
10
|
+
SIGNATURE_REPLAY_LOG_HEADER: Literal[17891331] = ...
|
|
11
|
+
SIGNATURE_OBJECT_TABLE_HEADER: Literal[17891329] = ...
|
|
12
|
+
OBJECT_TABLE_OFFSET: Literal[8192] = ...
|
|
13
|
+
SIGNATURE_KEY_TABLE_HEADER: Literal[2] = ...
|
|
14
|
+
class HyperVStorageHeader(__cs__.Structure):
|
|
15
|
+
signature: _c_hyperv.uint32
|
|
16
|
+
checksum: _c_hyperv.uint32
|
|
17
|
+
sequence_number: _c_hyperv.uint16
|
|
18
|
+
version: _c_hyperv.uint32
|
|
19
|
+
unknown2: _c_hyperv.uint64
|
|
20
|
+
alignment: _c_hyperv.uint32
|
|
21
|
+
replay_log_offset: _c_hyperv.uint64
|
|
22
|
+
replay_log_size: _c_hyperv.uint64
|
|
23
|
+
header_size: _c_hyperv.uint32
|
|
24
|
+
@overload
|
|
25
|
+
def __init__(
|
|
26
|
+
self,
|
|
27
|
+
/,
|
|
28
|
+
signature: _c_hyperv.uint32 | None = ...,
|
|
29
|
+
checksum: _c_hyperv.uint32 | None = ...,
|
|
30
|
+
sequence_number: _c_hyperv.uint16 | None = ...,
|
|
31
|
+
version: _c_hyperv.uint32 | None = ...,
|
|
32
|
+
unknown2: _c_hyperv.uint64 | None = ...,
|
|
33
|
+
alignment: _c_hyperv.uint32 | None = ...,
|
|
34
|
+
replay_log_offset: _c_hyperv.uint64 | None = ...,
|
|
35
|
+
replay_log_size: _c_hyperv.uint64 | None = ...,
|
|
36
|
+
header_size: _c_hyperv.uint32 | None = ...,
|
|
37
|
+
): ...
|
|
38
|
+
@overload
|
|
39
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
40
|
+
|
|
41
|
+
class HyperVStorageReplayLog(__cs__.Structure):
|
|
42
|
+
signature: _c_hyperv.uint32
|
|
43
|
+
checksum: _c_hyperv.uint32
|
|
44
|
+
num_entries: _c_hyperv.uint32
|
|
45
|
+
unknown1: _c_hyperv.uint8
|
|
46
|
+
max_entries: _c_hyperv.uint32
|
|
47
|
+
unknown2: _c_hyperv.uint32
|
|
48
|
+
unknown3: _c_hyperv.uint32
|
|
49
|
+
unknown4: _c_hyperv.uint32
|
|
50
|
+
unknown5: _c_hyperv.uint32
|
|
51
|
+
unknown6: _c_hyperv.uint8
|
|
52
|
+
@overload
|
|
53
|
+
def __init__(
|
|
54
|
+
self,
|
|
55
|
+
/,
|
|
56
|
+
signature: _c_hyperv.uint32 | None = ...,
|
|
57
|
+
checksum: _c_hyperv.uint32 | None = ...,
|
|
58
|
+
num_entries: _c_hyperv.uint32 | None = ...,
|
|
59
|
+
unknown1: _c_hyperv.uint8 | None = ...,
|
|
60
|
+
max_entries: _c_hyperv.uint32 | None = ...,
|
|
61
|
+
unknown2: _c_hyperv.uint32 | None = ...,
|
|
62
|
+
unknown3: _c_hyperv.uint32 | None = ...,
|
|
63
|
+
unknown4: _c_hyperv.uint32 | None = ...,
|
|
64
|
+
unknown5: _c_hyperv.uint32 | None = ...,
|
|
65
|
+
unknown6: _c_hyperv.uint8 | None = ...,
|
|
66
|
+
): ...
|
|
67
|
+
@overload
|
|
68
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
69
|
+
|
|
70
|
+
class HyperVStorageReplayLogEntry(__cs__.Structure):
|
|
71
|
+
offset: _c_hyperv.uint64
|
|
72
|
+
size: _c_hyperv.uint32
|
|
73
|
+
unknown2: _c_hyperv.uint32
|
|
74
|
+
unknown3: _c_hyperv.uint32
|
|
75
|
+
checksum: _c_hyperv.uint32
|
|
76
|
+
data_checksum: _c_hyperv.uint32
|
|
77
|
+
@overload
|
|
78
|
+
def __init__(
|
|
79
|
+
self,
|
|
80
|
+
/,
|
|
81
|
+
offset: _c_hyperv.uint64 | None = ...,
|
|
82
|
+
size: _c_hyperv.uint32 | None = ...,
|
|
83
|
+
unknown2: _c_hyperv.uint32 | None = ...,
|
|
84
|
+
unknown3: _c_hyperv.uint32 | None = ...,
|
|
85
|
+
checksum: _c_hyperv.uint32 | None = ...,
|
|
86
|
+
data_checksum: _c_hyperv.uint32 | None = ...,
|
|
87
|
+
): ...
|
|
88
|
+
@overload
|
|
89
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
90
|
+
|
|
91
|
+
class ObjectEntryType(__cs__.Enum):
|
|
92
|
+
Unknown0 = ...
|
|
93
|
+
ObjectTable = ...
|
|
94
|
+
KeyTable = ...
|
|
95
|
+
File = ...
|
|
96
|
+
Free = ...
|
|
97
|
+
Unknown5Header = ...
|
|
98
|
+
ReplayLog = ...
|
|
99
|
+
ChangeTrackingBuffer = ...
|
|
100
|
+
|
|
101
|
+
class HyperVStorageObjectTable(__cs__.Structure):
|
|
102
|
+
signature: _c_hyperv.uint32
|
|
103
|
+
num_entries: _c_hyperv.uint32
|
|
104
|
+
@overload
|
|
105
|
+
def __init__(self, /, signature: _c_hyperv.uint32 | None = ..., num_entries: _c_hyperv.uint32 | None = ...): ...
|
|
106
|
+
@overload
|
|
107
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
108
|
+
|
|
109
|
+
class HyperVStorageObjectTableEntry(__cs__.Structure):
|
|
110
|
+
type: _c_hyperv.ObjectEntryType
|
|
111
|
+
checksum: _c_hyperv.uint32
|
|
112
|
+
offset: _c_hyperv.uint64
|
|
113
|
+
size: _c_hyperv.uint32
|
|
114
|
+
allocated: _c_hyperv.uint8
|
|
115
|
+
@overload
|
|
116
|
+
def __init__(
|
|
117
|
+
self,
|
|
118
|
+
/,
|
|
119
|
+
type: _c_hyperv.ObjectEntryType | None = ...,
|
|
120
|
+
checksum: _c_hyperv.uint32 | None = ...,
|
|
121
|
+
offset: _c_hyperv.uint64 | None = ...,
|
|
122
|
+
size: _c_hyperv.uint32 | None = ...,
|
|
123
|
+
allocated: _c_hyperv.uint8 | None = ...,
|
|
124
|
+
): ...
|
|
125
|
+
@overload
|
|
126
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
127
|
+
|
|
128
|
+
class KeyDataType(__cs__.Enum):
|
|
129
|
+
Free = ...
|
|
130
|
+
Unknown = ...
|
|
131
|
+
Int = ...
|
|
132
|
+
UInt = ...
|
|
133
|
+
Double = ...
|
|
134
|
+
String = ...
|
|
135
|
+
Array = ...
|
|
136
|
+
Bool = ...
|
|
137
|
+
Node = ...
|
|
138
|
+
|
|
139
|
+
class KeyDataFlag(__cs__.Flag):
|
|
140
|
+
FileObjectPointer = ...
|
|
141
|
+
|
|
142
|
+
class HyperVStorageKeyTable(__cs__.Structure):
|
|
143
|
+
signature: _c_hyperv.uint16
|
|
144
|
+
index: _c_hyperv.uint16
|
|
145
|
+
sequence_number: _c_hyperv.uint16
|
|
146
|
+
checksum: _c_hyperv.uint32
|
|
147
|
+
@overload
|
|
148
|
+
def __init__(
|
|
149
|
+
self,
|
|
150
|
+
/,
|
|
151
|
+
signature: _c_hyperv.uint16 | None = ...,
|
|
152
|
+
index: _c_hyperv.uint16 | None = ...,
|
|
153
|
+
sequence_number: _c_hyperv.uint16 | None = ...,
|
|
154
|
+
checksum: _c_hyperv.uint32 | None = ...,
|
|
155
|
+
): ...
|
|
156
|
+
@overload
|
|
157
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
158
|
+
|
|
159
|
+
class HyperVStorageKeyTableEntryHeader(__cs__.Structure):
|
|
160
|
+
type: _c_hyperv.uint16
|
|
161
|
+
size: _c_hyperv.uint32
|
|
162
|
+
parent_table_idx: _c_hyperv.uint16
|
|
163
|
+
parent_offset: _c_hyperv.uint32
|
|
164
|
+
checksum: _c_hyperv.uint32
|
|
165
|
+
insertion_sequence: _c_hyperv.uint32
|
|
166
|
+
data_offset: _c_hyperv.uint8
|
|
167
|
+
@overload
|
|
168
|
+
def __init__(
|
|
169
|
+
self,
|
|
170
|
+
/,
|
|
171
|
+
type: _c_hyperv.uint16 | None = ...,
|
|
172
|
+
size: _c_hyperv.uint32 | None = ...,
|
|
173
|
+
parent_table_idx: _c_hyperv.uint16 | None = ...,
|
|
174
|
+
parent_offset: _c_hyperv.uint32 | None = ...,
|
|
175
|
+
checksum: _c_hyperv.uint32 | None = ...,
|
|
176
|
+
insertion_sequence: _c_hyperv.uint32 | None = ...,
|
|
177
|
+
data_offset: _c_hyperv.uint8 | None = ...,
|
|
178
|
+
): ...
|
|
179
|
+
@overload
|
|
180
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
181
|
+
|
|
182
|
+
# Technically `c_hyperv` is an instance of `_c_hyperv`, but then we can't use it in type hints
|
|
183
|
+
c_hyperv: TypeAlias = _c_hyperv
|
{dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/c_asif.pyi
RENAMED
|
@@ -26,6 +26,7 @@ class _c_asif(__cs__.cstruct):
|
|
|
26
26
|
@overload
|
|
27
27
|
def __init__(
|
|
28
28
|
self,
|
|
29
|
+
/,
|
|
29
30
|
header_signature: _c_asif.uint32 | None = ...,
|
|
30
31
|
header_version: _c_asif.uint32 | None = ...,
|
|
31
32
|
header_size: _c_asif.uint32 | None = ...,
|
|
@@ -55,6 +56,7 @@ class _c_asif(__cs__.cstruct):
|
|
|
55
56
|
@overload
|
|
56
57
|
def __init__(
|
|
57
58
|
self,
|
|
59
|
+
/,
|
|
58
60
|
header_signature: _c_asif.uint32 | None = ...,
|
|
59
61
|
header_version: _c_asif.uint32 | None = ...,
|
|
60
62
|
header_size: _c_asif.uint32 | None = ...,
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Generated by cstruct-stubgen
|
|
2
|
+
from typing import BinaryIO, Literal, TypeAlias, overload
|
|
3
|
+
|
|
4
|
+
import dissect.cstruct as __cs__
|
|
5
|
+
|
|
6
|
+
class _c_hdd(__cs__.cstruct):
|
|
7
|
+
SIGNATURE_STRUCTURED_DISK_V1: Literal[b"WithoutFreeSpace"] = ...
|
|
8
|
+
SIGNATURE_STRUCTURED_DISK_V2: Literal[b"WithouFreSpacExt"] = ...
|
|
9
|
+
SIGNATURE_DISK_IN_USE: Literal[1953459801] = ...
|
|
10
|
+
SECTOR_LOG: Literal[9] = ...
|
|
11
|
+
SECTOR_SIZE: Literal[512] = ...
|
|
12
|
+
class pvd_header(__cs__.Structure):
|
|
13
|
+
m_Sig: __cs__.CharArray
|
|
14
|
+
m_Type: _c_hdd.uint32
|
|
15
|
+
m_Heads: _c_hdd.uint32
|
|
16
|
+
m_Cylinders: _c_hdd.uint32
|
|
17
|
+
m_Sectors: _c_hdd.uint32
|
|
18
|
+
m_Size: _c_hdd.uint32
|
|
19
|
+
m_SizeInSectors_v1: _c_hdd.uint32
|
|
20
|
+
Unused: _c_hdd.uint32
|
|
21
|
+
m_SizeInSectors_v2: _c_hdd.uint64
|
|
22
|
+
m_DiskInUse: _c_hdd.uint32
|
|
23
|
+
m_FirstBlockOffset: _c_hdd.uint32
|
|
24
|
+
m_Flags: _c_hdd.uint32
|
|
25
|
+
m_FormatExtensionOffset: _c_hdd.uint64
|
|
26
|
+
@overload
|
|
27
|
+
def __init__(
|
|
28
|
+
self,
|
|
29
|
+
/,
|
|
30
|
+
m_Sig: __cs__.CharArray | None = ...,
|
|
31
|
+
m_Type: _c_hdd.uint32 | None = ...,
|
|
32
|
+
m_Heads: _c_hdd.uint32 | None = ...,
|
|
33
|
+
m_Cylinders: _c_hdd.uint32 | None = ...,
|
|
34
|
+
m_Sectors: _c_hdd.uint32 | None = ...,
|
|
35
|
+
m_Size: _c_hdd.uint32 | None = ...,
|
|
36
|
+
m_SizeInSectors_v1: _c_hdd.uint32 | None = ...,
|
|
37
|
+
Unused: _c_hdd.uint32 | None = ...,
|
|
38
|
+
m_SizeInSectors_v2: _c_hdd.uint64 | None = ...,
|
|
39
|
+
m_DiskInUse: _c_hdd.uint32 | None = ...,
|
|
40
|
+
m_FirstBlockOffset: _c_hdd.uint32 | None = ...,
|
|
41
|
+
m_Flags: _c_hdd.uint32 | None = ...,
|
|
42
|
+
m_FormatExtensionOffset: _c_hdd.uint64 | None = ...,
|
|
43
|
+
): ...
|
|
44
|
+
@overload
|
|
45
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
46
|
+
|
|
47
|
+
class pvd_ext_block_check(__cs__.Structure):
|
|
48
|
+
m_Magic: _c_hdd.uint64
|
|
49
|
+
m_Md5: __cs__.Array[_c_hdd.uint8]
|
|
50
|
+
@overload
|
|
51
|
+
def __init__(self, /, m_Magic: _c_hdd.uint64 | None = ..., m_Md5: __cs__.Array[_c_hdd.uint8] | None = ...): ...
|
|
52
|
+
@overload
|
|
53
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
54
|
+
|
|
55
|
+
class pvd_ext_block_element_header(__cs__.Structure):
|
|
56
|
+
magic: _c_hdd.uint64
|
|
57
|
+
flags: _c_hdd.uint64
|
|
58
|
+
size: _c_hdd.uint32
|
|
59
|
+
unused32: _c_hdd.uint32
|
|
60
|
+
@overload
|
|
61
|
+
def __init__(
|
|
62
|
+
self,
|
|
63
|
+
/,
|
|
64
|
+
magic: _c_hdd.uint64 | None = ...,
|
|
65
|
+
flags: _c_hdd.uint64 | None = ...,
|
|
66
|
+
size: _c_hdd.uint32 | None = ...,
|
|
67
|
+
unused32: _c_hdd.uint32 | None = ...,
|
|
68
|
+
): ...
|
|
69
|
+
@overload
|
|
70
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
71
|
+
|
|
72
|
+
class pvd_dirty_bitmap_raw(__cs__.Structure):
|
|
73
|
+
m_Size: _c_hdd.uint64
|
|
74
|
+
m_Id: __cs__.Array[_c_hdd.uint8]
|
|
75
|
+
m_Granularity: _c_hdd.uint32
|
|
76
|
+
m_L1Size: _c_hdd.uint32
|
|
77
|
+
m_L1: __cs__.Array[_c_hdd.uint64]
|
|
78
|
+
@overload
|
|
79
|
+
def __init__(
|
|
80
|
+
self,
|
|
81
|
+
/,
|
|
82
|
+
m_Size: _c_hdd.uint64 | None = ...,
|
|
83
|
+
m_Id: __cs__.Array[_c_hdd.uint8] | None = ...,
|
|
84
|
+
m_Granularity: _c_hdd.uint32 | None = ...,
|
|
85
|
+
m_L1Size: _c_hdd.uint32 | None = ...,
|
|
86
|
+
m_L1: __cs__.Array[_c_hdd.uint64] | None = ...,
|
|
87
|
+
): ...
|
|
88
|
+
@overload
|
|
89
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
90
|
+
|
|
91
|
+
# Technically `c_hdd` is an instance of `_c_hdd`, but then we can't use it in type hints
|
|
92
|
+
c_hdd: TypeAlias = _c_hdd
|
{dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/c_qcow2.pyi
RENAMED
|
@@ -59,6 +59,7 @@ class _c_qcow2(__cs__.cstruct):
|
|
|
59
59
|
@overload
|
|
60
60
|
def __init__(
|
|
61
61
|
self,
|
|
62
|
+
/,
|
|
62
63
|
magic: _c_qcow2.uint32 | None = ...,
|
|
63
64
|
version: _c_qcow2.uint32 | None = ...,
|
|
64
65
|
backing_file_offset: _c_qcow2.uint64 | None = ...,
|
|
@@ -87,7 +88,7 @@ class _c_qcow2(__cs__.cstruct):
|
|
|
87
88
|
magic: _c_qcow2.uint32
|
|
88
89
|
len: _c_qcow2.uint32
|
|
89
90
|
@overload
|
|
90
|
-
def __init__(self, magic: _c_qcow2.uint32 | None = ..., len: _c_qcow2.uint32 | None = ...): ...
|
|
91
|
+
def __init__(self, /, magic: _c_qcow2.uint32 | None = ..., len: _c_qcow2.uint32 | None = ...): ...
|
|
91
92
|
@overload
|
|
92
93
|
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
93
94
|
|
|
@@ -95,7 +96,7 @@ class _c_qcow2(__cs__.cstruct):
|
|
|
95
96
|
offset: _c_qcow2.uint64
|
|
96
97
|
length: _c_qcow2.uint64
|
|
97
98
|
@overload
|
|
98
|
-
def __init__(self, offset: _c_qcow2.uint64 | None = ..., length: _c_qcow2.uint64 | None = ...): ...
|
|
99
|
+
def __init__(self, /, offset: _c_qcow2.uint64 | None = ..., length: _c_qcow2.uint64 | None = ...): ...
|
|
99
100
|
@overload
|
|
100
101
|
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
101
102
|
|
|
@@ -107,6 +108,7 @@ class _c_qcow2(__cs__.cstruct):
|
|
|
107
108
|
@overload
|
|
108
109
|
def __init__(
|
|
109
110
|
self,
|
|
111
|
+
/,
|
|
110
112
|
nb_bitmaps: _c_qcow2.uint32 | None = ...,
|
|
111
113
|
reserved32: _c_qcow2.uint32 | None = ...,
|
|
112
114
|
bitmap_directory_size: _c_qcow2.uint64 | None = ...,
|
|
@@ -128,6 +130,7 @@ class _c_qcow2(__cs__.cstruct):
|
|
|
128
130
|
@overload
|
|
129
131
|
def __init__(
|
|
130
132
|
self,
|
|
133
|
+
/,
|
|
131
134
|
l1_table_offset: _c_qcow2.uint64 | None = ...,
|
|
132
135
|
l1_size: _c_qcow2.uint32 | None = ...,
|
|
133
136
|
id_str_size: _c_qcow2.uint16 | None = ...,
|
|
@@ -148,6 +151,7 @@ class _c_qcow2(__cs__.cstruct):
|
|
|
148
151
|
@overload
|
|
149
152
|
def __init__(
|
|
150
153
|
self,
|
|
154
|
+
/,
|
|
151
155
|
vm_state_size_large: _c_qcow2.uint64 | None = ...,
|
|
152
156
|
disk_size: _c_qcow2.uint64 | None = ...,
|
|
153
157
|
icount: _c_qcow2.uint64 | None = ...,
|
{dissect_hypervisor-3.22.dev5 → dissect_hypervisor-3.22.dev6}/dissect/hypervisor/disk/c_vdi.pyi
RENAMED
|
@@ -22,6 +22,7 @@ class _c_vdi(__cs__.cstruct):
|
|
|
22
22
|
@overload
|
|
23
23
|
def __init__(
|
|
24
24
|
self,
|
|
25
|
+
/,
|
|
25
26
|
Cylinders: _c_vdi.uint32 | None = ...,
|
|
26
27
|
Heads: _c_vdi.uint32 | None = ...,
|
|
27
28
|
Sectors: _c_vdi.uint32 | None = ...,
|
|
@@ -38,6 +39,7 @@ class _c_vdi(__cs__.cstruct):
|
|
|
38
39
|
@overload
|
|
39
40
|
def __init__(
|
|
40
41
|
self,
|
|
42
|
+
/,
|
|
41
43
|
szFileInfo: __cs__.CharArray | None = ...,
|
|
42
44
|
u32Signature: _c_vdi.uint32 | None = ...,
|
|
43
45
|
u32Version: _c_vdi.uint32 | None = ...,
|
|
@@ -68,6 +70,7 @@ class _c_vdi(__cs__.cstruct):
|
|
|
68
70
|
@overload
|
|
69
71
|
def __init__(
|
|
70
72
|
self,
|
|
73
|
+
/,
|
|
71
74
|
cbHeader: _c_vdi.uint32 | None = ...,
|
|
72
75
|
u32Type: _c_vdi.VDI_IMAGE_TYPE | None = ...,
|
|
73
76
|
fFlags: _c_vdi.VDI_IMAGE_FLAGS | None = ...,
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Generated by cstruct-stubgen
|
|
2
|
+
from typing import BinaryIO, TypeAlias, overload
|
|
3
|
+
|
|
4
|
+
import dissect.cstruct as __cs__
|
|
5
|
+
|
|
6
|
+
class _c_vhd(__cs__.cstruct):
|
|
7
|
+
class footer(__cs__.Structure):
|
|
8
|
+
cookie: __cs__.CharArray
|
|
9
|
+
features: _c_vhd.uint32
|
|
10
|
+
version: _c_vhd.uint32
|
|
11
|
+
data_offset: _c_vhd.uint64
|
|
12
|
+
timestamp: _c_vhd.uint32
|
|
13
|
+
creator_application: _c_vhd.uint32
|
|
14
|
+
creator_version: _c_vhd.uint32
|
|
15
|
+
creator_host_os: _c_vhd.uint32
|
|
16
|
+
original_size: _c_vhd.uint64
|
|
17
|
+
current_size: _c_vhd.uint64
|
|
18
|
+
disk_geometry: _c_vhd.uint32
|
|
19
|
+
disk_type: _c_vhd.uint32
|
|
20
|
+
checksum: _c_vhd.uint32
|
|
21
|
+
unique_id: __cs__.CharArray
|
|
22
|
+
saved_state: _c_vhd.char
|
|
23
|
+
reserved: __cs__.CharArray
|
|
24
|
+
@overload
|
|
25
|
+
def __init__(
|
|
26
|
+
self,
|
|
27
|
+
/,
|
|
28
|
+
cookie: __cs__.CharArray | None = ...,
|
|
29
|
+
features: _c_vhd.uint32 | None = ...,
|
|
30
|
+
version: _c_vhd.uint32 | None = ...,
|
|
31
|
+
data_offset: _c_vhd.uint64 | None = ...,
|
|
32
|
+
timestamp: _c_vhd.uint32 | None = ...,
|
|
33
|
+
creator_application: _c_vhd.uint32 | None = ...,
|
|
34
|
+
creator_version: _c_vhd.uint32 | None = ...,
|
|
35
|
+
creator_host_os: _c_vhd.uint32 | None = ...,
|
|
36
|
+
original_size: _c_vhd.uint64 | None = ...,
|
|
37
|
+
current_size: _c_vhd.uint64 | None = ...,
|
|
38
|
+
disk_geometry: _c_vhd.uint32 | None = ...,
|
|
39
|
+
disk_type: _c_vhd.uint32 | None = ...,
|
|
40
|
+
checksum: _c_vhd.uint32 | None = ...,
|
|
41
|
+
unique_id: __cs__.CharArray | None = ...,
|
|
42
|
+
saved_state: _c_vhd.char | None = ...,
|
|
43
|
+
reserved: __cs__.CharArray | None = ...,
|
|
44
|
+
): ...
|
|
45
|
+
@overload
|
|
46
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
47
|
+
|
|
48
|
+
class parent_locator(__cs__.Structure):
|
|
49
|
+
platform_code: _c_vhd.uint32
|
|
50
|
+
platform_data_space: _c_vhd.uint32
|
|
51
|
+
platform_data_length: _c_vhd.uint32
|
|
52
|
+
reserved: _c_vhd.uint32
|
|
53
|
+
platform_data_offset: _c_vhd.uint64
|
|
54
|
+
@overload
|
|
55
|
+
def __init__(
|
|
56
|
+
self,
|
|
57
|
+
/,
|
|
58
|
+
platform_code: _c_vhd.uint32 | None = ...,
|
|
59
|
+
platform_data_space: _c_vhd.uint32 | None = ...,
|
|
60
|
+
platform_data_length: _c_vhd.uint32 | None = ...,
|
|
61
|
+
reserved: _c_vhd.uint32 | None = ...,
|
|
62
|
+
platform_data_offset: _c_vhd.uint64 | None = ...,
|
|
63
|
+
): ...
|
|
64
|
+
@overload
|
|
65
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
66
|
+
|
|
67
|
+
class dynamic_header(__cs__.Structure):
|
|
68
|
+
cookie: __cs__.CharArray
|
|
69
|
+
data_offset: _c_vhd.uint64
|
|
70
|
+
table_offset: _c_vhd.uint64
|
|
71
|
+
header_version: _c_vhd.uint32
|
|
72
|
+
max_table_entries: _c_vhd.uint32
|
|
73
|
+
block_size: _c_vhd.uint32
|
|
74
|
+
checksum: _c_vhd.uint32
|
|
75
|
+
parent_unique_id: __cs__.CharArray
|
|
76
|
+
parent_timestamp: _c_vhd.uint32
|
|
77
|
+
reserved1: _c_vhd.uint32
|
|
78
|
+
parent_unicode_name: __cs__.CharArray
|
|
79
|
+
parent_locators: __cs__.Array[_c_vhd.parent_locator]
|
|
80
|
+
reserved2: __cs__.CharArray
|
|
81
|
+
@overload
|
|
82
|
+
def __init__(
|
|
83
|
+
self,
|
|
84
|
+
/,
|
|
85
|
+
cookie: __cs__.CharArray | None = ...,
|
|
86
|
+
data_offset: _c_vhd.uint64 | None = ...,
|
|
87
|
+
table_offset: _c_vhd.uint64 | None = ...,
|
|
88
|
+
header_version: _c_vhd.uint32 | None = ...,
|
|
89
|
+
max_table_entries: _c_vhd.uint32 | None = ...,
|
|
90
|
+
block_size: _c_vhd.uint32 | None = ...,
|
|
91
|
+
checksum: _c_vhd.uint32 | None = ...,
|
|
92
|
+
parent_unique_id: __cs__.CharArray | None = ...,
|
|
93
|
+
parent_timestamp: _c_vhd.uint32 | None = ...,
|
|
94
|
+
reserved1: _c_vhd.uint32 | None = ...,
|
|
95
|
+
parent_unicode_name: __cs__.CharArray | None = ...,
|
|
96
|
+
parent_locators: __cs__.Array[_c_vhd.parent_locator] | None = ...,
|
|
97
|
+
reserved2: __cs__.CharArray | None = ...,
|
|
98
|
+
): ...
|
|
99
|
+
@overload
|
|
100
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
101
|
+
|
|
102
|
+
# Technically `c_vhd` is an instance of `_c_vhd`, but then we can't use it in type hints
|
|
103
|
+
c_vhd: TypeAlias = _c_vhd
|