dissect.archive 1.9.dev4__tar.gz → 1.9.dev5__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_archive-1.9.dev4 → dissect_archive-1.9.dev5}/PKG-INFO +1 -1
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/tibx/__init__.py +2 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/tibx/exception.py +7 -5
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/tools/backup.py +4 -4
- dissect_archive-1.9.dev5/dissect/archive/vbk/__init__.py +16 -0
- dissect_archive-1.9.dev5/dissect/archive/vbk/c_vbk.pyi +482 -0
- {dissect_archive-1.9.dev4/dissect/archive → dissect_archive-1.9.dev5/dissect/archive/vbk}/vbk.py +2 -2
- dissect_archive-1.9.dev5/dissect/archive/vma/__init__.py +9 -0
- dissect_archive-1.9.dev5/dissect/archive/vma/c_vma.pyi +91 -0
- {dissect_archive-1.9.dev4/dissect/archive → dissect_archive-1.9.dev5/dissect/archive/vma}/vma.py +2 -2
- dissect_archive-1.9.dev5/dissect/archive/wim/__init__.py +11 -0
- dissect_archive-1.9.dev5/dissect/archive/wim/c_wim.pyi +330 -0
- {dissect_archive-1.9.dev4/dissect/archive → dissect_archive-1.9.dev5/dissect/archive/wim}/wim.py +7 -7
- dissect_archive-1.9.dev5/dissect/archive/xva/__init__.py +8 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect.archive.egg-info/PKG-INFO +1 -1
- dissect_archive-1.9.dev5/dissect.archive.egg-info/SOURCES.txt +91 -0
- dissect_archive-1.9.dev5/dissect.archive.egg-info/scm_file_list.json +90 -0
- dissect_archive-1.9.dev5/dissect.archive.egg-info/scm_version.json +8 -0
- dissect_archive-1.9.dev5/tests/_util.py +7 -0
- dissect_archive-1.9.dev5/tests/test_exception.py +21 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/tibx/test_tibx_acronis.py +3 -3
- dissect_archive-1.9.dev5/tests/vbk/__init__.py +0 -0
- dissect_archive-1.9.dev5/tests/vbk/test_vbk.py +131 -0
- dissect_archive-1.9.dev5/tests/vma/__init__.py +0 -0
- dissect_archive-1.9.dev5/tests/vma/test_vma.py +69 -0
- dissect_archive-1.9.dev5/tests/wim/__init__.py +0 -0
- dissect_archive-1.9.dev5/tests/wim/test_wim.py +79 -0
- dissect_archive-1.9.dev4/dissect.archive.egg-info/SOURCES.txt +0 -81
- dissect_archive-1.9.dev4/dissect.archive.egg-info/scm_file_list.json +0 -80
- dissect_archive-1.9.dev4/dissect.archive.egg-info/scm_version.json +0 -8
- dissect_archive-1.9.dev4/tests/conftest.py +0 -59
- dissect_archive-1.9.dev4/tests/test_exceptions.py +0 -21
- dissect_archive-1.9.dev4/tests/test_vbk.py +0 -128
- dissect_archive-1.9.dev4/tests/test_vma.py +0 -67
- dissect_archive-1.9.dev4/tests/test_wim.py +0 -76
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/.git-blame-ignore-revs +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/.gitattributes +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/COPYRIGHT +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/LICENSE +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/MANIFEST.in +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/README.md +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/__init__.py +0 -0
- /dissect_archive-1.9.dev4/dissect/archive/exceptions.py → /dissect_archive-1.9.dev5/dissect/archive/exception.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/tibx/c_tibx.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/tibx/c_tibx.pyi +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/tibx/codec.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/tibx/crypto.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/tibx/lsm.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/tibx/map.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/tibx/page.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/tibx/segment.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/tibx/stream.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/tibx/tibx.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect/archive/tools/__init__.py +0 -0
- {dissect_archive-1.9.dev4/dissect/archive → dissect_archive-1.9.dev5/dissect/archive/vbk}/c_vbk.py +0 -0
- {dissect_archive-1.9.dev4/dissect/archive → dissect_archive-1.9.dev5/dissect/archive/vma}/c_vma.py +0 -0
- {dissect_archive-1.9.dev4/dissect/archive → dissect_archive-1.9.dev5/dissect/archive/wim}/c_wim.py +0 -0
- {dissect_archive-1.9.dev4/dissect/archive → dissect_archive-1.9.dev5/dissect/archive/xva}/xva.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect.archive.egg-info/dependency_links.txt +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect.archive.egg-info/entry_points.txt +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect.archive.egg-info/requires.txt +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/dissect.archive.egg-info/top_level.txt +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/pyproject.toml +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/setup.cfg +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/__init__.py +0 -0
- {dissect_archive-1.9.dev4/tests/_data/acronis → dissect_archive-1.9.dev5/tests/_data}/tibx/ati_2020_disk_enc_lz4_compr.tibx +0 -0
- {dissect_archive-1.9.dev4/tests/_data/acronis → dissect_archive-1.9.dev5/tests/_data}/tibx/ati_2020_disk_lz4_compr.tibx +0 -0
- {dissect_archive-1.9.dev4/tests/_data/acronis → dissect_archive-1.9.dev5/tests/_data}/tibx/t1_chain_diff-0001.tibx +0 -0
- {dissect_archive-1.9.dev4/tests/_data/acronis → dissect_archive-1.9.dev5/tests/_data}/tibx/t1_chain_diff.tibx +0 -0
- {dissect_archive-1.9.dev4/tests/_data/acronis → dissect_archive-1.9.dev5/tests/_data}/tibx/t1_chain_inc.tibx +0 -0
- {dissect_archive-1.9.dev4/tests/_data/acronis → dissect_archive-1.9.dev5/tests/_data}/tibx/t1_disk_gpt.tibx +0 -0
- {dissect_archive-1.9.dev4/tests/_data/acronis → dissect_archive-1.9.dev5/tests/_data}/tibx/t1_disk_mbr.tibx +0 -0
- {dissect_archive-1.9.dev4/tests/_data/acronis → dissect_archive-1.9.dev5/tests/_data}/tibx/t1_empty_ntfs.tibx +0 -0
- {dissect_archive-1.9.dev4/tests/_data/acronis → dissect_archive-1.9.dev5/tests/_data}/tibx/t1_enc_aes.tibx +0 -0
- {dissect_archive-1.9.dev4/tests/_data/acronis → dissect_archive-1.9.dev5/tests/_data}/tibx/t1_legacy_tib.tibx +0 -0
- {dissect_archive-1.9.dev4/tests/_data/acronis → dissect_archive-1.9.dev5/tests/_data}/tibx/t1_multivol.tibx +0 -0
- {dissect_archive-1.9.dev4/tests/_data/acronis → dissect_archive-1.9.dev5/tests/_data}/tibx/t1_simple_ntfs.tibx +0 -0
- {dissect_archive-1.9.dev4/tests/_data/acronis → dissect_archive-1.9.dev5/tests/_data}/tibx/t1_stored.tibx +0 -0
- {dissect_archive-1.9.dev4/tests/_data → dissect_archive-1.9.dev5/tests/_data/vbk}/test13.vbk.gz +0 -0
- {dissect_archive-1.9.dev4/tests/_data → dissect_archive-1.9.dev5/tests/_data/vbk}/test9.vbk.gz +0 -0
- {dissect_archive-1.9.dev4/tests/_data → dissect_archive-1.9.dev5/tests/_data/vma}/test.vma.gz +0 -0
- {dissect_archive-1.9.dev4/tests/_data → dissect_archive-1.9.dev5/tests/_data/wim}/basic16k.wim.gz +0 -0
- {dissect_archive-1.9.dev4/tests/_data → dissect_archive-1.9.dev5/tests/_data/wim}/basic32k.wim.gz +0 -0
- {dissect_archive-1.9.dev4/tests/_data → dissect_archive-1.9.dev5/tests/_data/wim}/basic4k.wim.gz +0 -0
- {dissect_archive-1.9.dev4/tests/_data → dissect_archive-1.9.dev5/tests/_data/wim}/basic8k.wim.gz +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/_docs/Makefile +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/_docs/__init__.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/_docs/conf.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/_docs/index.rst +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/_tools/__init__.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/_tools/tibx/__init__.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/_tools/tibx/_synth.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/tibx/__init__.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/tibx/test_codec.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/tibx/test_crypto.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/tibx/test_lsm.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/tibx/test_page.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/tibx/test_recovery.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/tibx/test_segment.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tests/tibx/test_tibx.py +0 -0
- {dissect_archive-1.9.dev4 → dissect_archive-1.9.dev5}/tox.ini +0 -0
|
@@ -5,6 +5,7 @@ from dissect.archive.tibx.exception import (
|
|
|
5
5
|
Error,
|
|
6
6
|
InvalidArchiveError,
|
|
7
7
|
InvalidPasswordError,
|
|
8
|
+
TibxError,
|
|
8
9
|
UnsupportedFormatError,
|
|
9
10
|
)
|
|
10
11
|
from dissect.archive.tibx.stream import TibxVolumeStream
|
|
@@ -17,6 +18,7 @@ __all__ = [
|
|
|
17
18
|
"InvalidArchiveError",
|
|
18
19
|
"InvalidPasswordError",
|
|
19
20
|
"RecoveryPoint",
|
|
21
|
+
"TibxError",
|
|
20
22
|
"TibxVolume",
|
|
21
23
|
"TibxVolumeStream",
|
|
22
24
|
"UnsupportedFormatError",
|
|
@@ -2,22 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from dissect.archive.exception import Error
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
|
|
8
|
+
class TibxError(Error):
|
|
7
9
|
"""Base exception for TIBX parsing errors."""
|
|
8
10
|
|
|
9
11
|
|
|
10
|
-
class InvalidArchiveError(
|
|
12
|
+
class InvalidArchiveError(TibxError):
|
|
11
13
|
"""The file is not a TIBX archive."""
|
|
12
14
|
|
|
13
15
|
|
|
14
|
-
class CorruptArchiveError(
|
|
16
|
+
class CorruptArchiveError(TibxError):
|
|
15
17
|
"""The archive is a TIBX archive but its structure is damaged."""
|
|
16
18
|
|
|
17
19
|
|
|
18
|
-
class UnsupportedFormatError(
|
|
20
|
+
class UnsupportedFormatError(TibxError):
|
|
19
21
|
"""The archive uses a TIBX feature this parser does not (yet) support."""
|
|
20
22
|
|
|
21
23
|
|
|
22
|
-
class InvalidPasswordError(
|
|
24
|
+
class InvalidPasswordError(TibxError):
|
|
23
25
|
"""The archive is encrypted and the supplied password is missing or wrong."""
|
|
@@ -6,12 +6,12 @@ import sys
|
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
from typing import TYPE_CHECKING
|
|
8
8
|
|
|
9
|
-
from dissect.archive.
|
|
10
|
-
from dissect.archive.
|
|
11
|
-
from dissect.archive.vma import VMA, _iter_mask
|
|
9
|
+
from dissect.archive.vbk.vbk import VBK
|
|
10
|
+
from dissect.archive.vma.c_vma import c_vma
|
|
11
|
+
from dissect.archive.vma.vma import VMA, _iter_mask
|
|
12
12
|
|
|
13
13
|
if TYPE_CHECKING:
|
|
14
|
-
from dissect.archive.vbk import DirItem
|
|
14
|
+
from dissect.archive.vbk.vbk import DirItem
|
|
15
15
|
|
|
16
16
|
try:
|
|
17
17
|
from rich.logging import RichHandler
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from dissect.archive.exception import Error, FileNotFoundError, IsADirectoryError, NotADirectoryError
|
|
4
|
+
from dissect.archive.vbk.vbk import VBK, DirItem, MetaBlob, SnapshotSlot, VBKError
|
|
5
|
+
|
|
6
|
+
__all__ = [
|
|
7
|
+
"VBK",
|
|
8
|
+
"DirItem",
|
|
9
|
+
"Error",
|
|
10
|
+
"FileNotFoundError",
|
|
11
|
+
"IsADirectoryError",
|
|
12
|
+
"MetaBlob",
|
|
13
|
+
"NotADirectoryError",
|
|
14
|
+
"SnapshotSlot",
|
|
15
|
+
"VBKError",
|
|
16
|
+
]
|
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
# Generated by cstruct-stubgen
|
|
2
|
+
from typing import BinaryIO, Literal, TypeAlias, overload
|
|
3
|
+
|
|
4
|
+
import dissect.cstruct as __cs__
|
|
5
|
+
|
|
6
|
+
class _c_vbk(__cs__.cstruct):
|
|
7
|
+
PAGE_SIZE: Literal[4096] = ...
|
|
8
|
+
class StorageHeader(__cs__.Structure):
|
|
9
|
+
FormatVersion: _c_vbk.uint32
|
|
10
|
+
Initialized: _c_vbk.uint32
|
|
11
|
+
DigestTypeLength: _c_vbk.uint32
|
|
12
|
+
DigestType: __cs__.CharArray
|
|
13
|
+
SnapshotSlotFormat: _c_vbk.uint32
|
|
14
|
+
StandardBlockSize: _c_vbk.uint32
|
|
15
|
+
ClusterAlign: _c_vbk.uint8
|
|
16
|
+
Unk0: __cs__.CharArray
|
|
17
|
+
ExternalStorageId: __cs__.CharArray
|
|
18
|
+
@overload
|
|
19
|
+
def __init__(
|
|
20
|
+
self,
|
|
21
|
+
FormatVersion: _c_vbk.uint32 | None = ...,
|
|
22
|
+
Initialized: _c_vbk.uint32 | None = ...,
|
|
23
|
+
DigestTypeLength: _c_vbk.uint32 | None = ...,
|
|
24
|
+
DigestType: __cs__.CharArray | None = ...,
|
|
25
|
+
SnapshotSlotFormat: _c_vbk.uint32 | None = ...,
|
|
26
|
+
StandardBlockSize: _c_vbk.uint32 | None = ...,
|
|
27
|
+
ClusterAlign: _c_vbk.uint8 | None = ...,
|
|
28
|
+
Unk0: __cs__.CharArray | None = ...,
|
|
29
|
+
ExternalStorageId: __cs__.CharArray | None = ...,
|
|
30
|
+
): ...
|
|
31
|
+
@overload
|
|
32
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
33
|
+
|
|
34
|
+
class SnapshotSlotHeader(__cs__.Structure):
|
|
35
|
+
CRC: _c_vbk.uint32
|
|
36
|
+
ContainsSnapshot: _c_vbk.uint32
|
|
37
|
+
@overload
|
|
38
|
+
def __init__(self, CRC: _c_vbk.uint32 | None = ..., ContainsSnapshot: _c_vbk.uint32 | None = ...): ...
|
|
39
|
+
@overload
|
|
40
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
41
|
+
|
|
42
|
+
class DirectoryRootRecord(__cs__.Structure):
|
|
43
|
+
RootPage: _c_vbk.int64
|
|
44
|
+
Count: _c_vbk.uint64
|
|
45
|
+
@overload
|
|
46
|
+
def __init__(self, RootPage: _c_vbk.int64 | None = ..., Count: _c_vbk.uint64 | None = ...): ...
|
|
47
|
+
@overload
|
|
48
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
49
|
+
|
|
50
|
+
class BlocksStoreHeader(__cs__.Structure):
|
|
51
|
+
RootPage: _c_vbk.int64
|
|
52
|
+
Count: _c_vbk.uint64
|
|
53
|
+
FreeRootPage: _c_vbk.int64
|
|
54
|
+
DeduplicationRootPage: _c_vbk.int64
|
|
55
|
+
Unk0: _c_vbk.int64
|
|
56
|
+
Unk1: _c_vbk.int64
|
|
57
|
+
@overload
|
|
58
|
+
def __init__(
|
|
59
|
+
self,
|
|
60
|
+
RootPage: _c_vbk.int64 | None = ...,
|
|
61
|
+
Count: _c_vbk.uint64 | None = ...,
|
|
62
|
+
FreeRootPage: _c_vbk.int64 | None = ...,
|
|
63
|
+
DeduplicationRootPage: _c_vbk.int64 | None = ...,
|
|
64
|
+
Unk0: _c_vbk.int64 | None = ...,
|
|
65
|
+
Unk1: _c_vbk.int64 | None = ...,
|
|
66
|
+
): ...
|
|
67
|
+
@overload
|
|
68
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
69
|
+
|
|
70
|
+
class CryptoStoreRecord(__cs__.Structure):
|
|
71
|
+
RootPage: _c_vbk.int64
|
|
72
|
+
@overload
|
|
73
|
+
def __init__(self, RootPage: _c_vbk.int64 | None = ...): ...
|
|
74
|
+
@overload
|
|
75
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
76
|
+
|
|
77
|
+
class SnapshotDescriptor(__cs__.Structure):
|
|
78
|
+
Version: _c_vbk.uint64
|
|
79
|
+
StorageEOF: _c_vbk.uint64
|
|
80
|
+
BanksCount: _c_vbk.uint32
|
|
81
|
+
DirectoryRoot: _c_vbk.DirectoryRootRecord
|
|
82
|
+
BlocksStore: _c_vbk.BlocksStoreHeader
|
|
83
|
+
CryptoStore: _c_vbk.CryptoStoreRecord
|
|
84
|
+
Unk0: _c_vbk.uint64
|
|
85
|
+
Unk1: _c_vbk.uint64
|
|
86
|
+
@overload
|
|
87
|
+
def __init__(
|
|
88
|
+
self,
|
|
89
|
+
Version: _c_vbk.uint64 | None = ...,
|
|
90
|
+
StorageEOF: _c_vbk.uint64 | None = ...,
|
|
91
|
+
BanksCount: _c_vbk.uint32 | None = ...,
|
|
92
|
+
DirectoryRoot: _c_vbk.DirectoryRootRecord | None = ...,
|
|
93
|
+
BlocksStore: _c_vbk.BlocksStoreHeader | None = ...,
|
|
94
|
+
CryptoStore: _c_vbk.CryptoStoreRecord | None = ...,
|
|
95
|
+
Unk0: _c_vbk.uint64 | None = ...,
|
|
96
|
+
Unk1: _c_vbk.uint64 | None = ...,
|
|
97
|
+
): ...
|
|
98
|
+
@overload
|
|
99
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
100
|
+
|
|
101
|
+
class BankDescriptor(__cs__.Structure):
|
|
102
|
+
CRC: _c_vbk.uint32
|
|
103
|
+
Offset: _c_vbk.uint64
|
|
104
|
+
Size: _c_vbk.uint32
|
|
105
|
+
@overload
|
|
106
|
+
def __init__(
|
|
107
|
+
self, CRC: _c_vbk.uint32 | None = ..., Offset: _c_vbk.uint64 | None = ..., Size: _c_vbk.uint32 | None = ...
|
|
108
|
+
): ...
|
|
109
|
+
@overload
|
|
110
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
111
|
+
|
|
112
|
+
class BanksGrain(__cs__.Structure):
|
|
113
|
+
MaxBanks: _c_vbk.uint32
|
|
114
|
+
StoredBanks: _c_vbk.uint32
|
|
115
|
+
@overload
|
|
116
|
+
def __init__(self, MaxBanks: _c_vbk.uint32 | None = ..., StoredBanks: _c_vbk.uint32 | None = ...): ...
|
|
117
|
+
@overload
|
|
118
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
119
|
+
|
|
120
|
+
class BankHeader(__cs__.Structure):
|
|
121
|
+
PageCount: _c_vbk.uint16
|
|
122
|
+
Flags: _c_vbk.uint16
|
|
123
|
+
Unk0: __cs__.CharArray
|
|
124
|
+
Unk1: _c_vbk.uint64
|
|
125
|
+
Unk2: __cs__.CharArray
|
|
126
|
+
@overload
|
|
127
|
+
def __init__(
|
|
128
|
+
self,
|
|
129
|
+
PageCount: _c_vbk.uint16 | None = ...,
|
|
130
|
+
Flags: _c_vbk.uint16 | None = ...,
|
|
131
|
+
Unk0: __cs__.CharArray | None = ...,
|
|
132
|
+
Unk1: _c_vbk.uint64 | None = ...,
|
|
133
|
+
Unk2: __cs__.CharArray | None = ...,
|
|
134
|
+
): ...
|
|
135
|
+
@overload
|
|
136
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
137
|
+
|
|
138
|
+
class BankHeaderV71(__cs__.Structure):
|
|
139
|
+
PageCount: _c_vbk.uint16
|
|
140
|
+
Flags: _c_vbk.uint16
|
|
141
|
+
Unk0: __cs__.CharArray
|
|
142
|
+
KeySetId: __cs__.CharArray
|
|
143
|
+
Unk1: __cs__.CharArray
|
|
144
|
+
Unk2: __cs__.CharArray
|
|
145
|
+
Unk3: _c_vbk.uint32
|
|
146
|
+
Unk4: __cs__.CharArray
|
|
147
|
+
@overload
|
|
148
|
+
def __init__(
|
|
149
|
+
self,
|
|
150
|
+
PageCount: _c_vbk.uint16 | None = ...,
|
|
151
|
+
Flags: _c_vbk.uint16 | None = ...,
|
|
152
|
+
Unk0: __cs__.CharArray | None = ...,
|
|
153
|
+
KeySetId: __cs__.CharArray | None = ...,
|
|
154
|
+
Unk1: __cs__.CharArray | None = ...,
|
|
155
|
+
Unk2: __cs__.CharArray | None = ...,
|
|
156
|
+
Unk3: _c_vbk.uint32 | None = ...,
|
|
157
|
+
Unk4: __cs__.CharArray | None = ...,
|
|
158
|
+
): ...
|
|
159
|
+
@overload
|
|
160
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
161
|
+
|
|
162
|
+
class MetaBlobHeader(__cs__.Structure):
|
|
163
|
+
NextPage: _c_vbk.int64
|
|
164
|
+
Unk0: _c_vbk.int32
|
|
165
|
+
@overload
|
|
166
|
+
def __init__(self, NextPage: _c_vbk.int64 | None = ..., Unk0: _c_vbk.int32 | None = ...): ...
|
|
167
|
+
@overload
|
|
168
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
169
|
+
|
|
170
|
+
class Lz4BlockHeader(__cs__.Structure):
|
|
171
|
+
Magic: _c_vbk.uint32
|
|
172
|
+
CRC: _c_vbk.uint32
|
|
173
|
+
SourceSize: _c_vbk.uint32
|
|
174
|
+
@overload
|
|
175
|
+
def __init__(
|
|
176
|
+
self,
|
|
177
|
+
Magic: _c_vbk.uint32 | None = ...,
|
|
178
|
+
CRC: _c_vbk.uint32 | None = ...,
|
|
179
|
+
SourceSize: _c_vbk.uint32 | None = ...,
|
|
180
|
+
): ...
|
|
181
|
+
@overload
|
|
182
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
183
|
+
|
|
184
|
+
class BlocksVectorHeader(__cs__.Structure):
|
|
185
|
+
RootPage: _c_vbk.uint64
|
|
186
|
+
Count: _c_vbk.uint64
|
|
187
|
+
@overload
|
|
188
|
+
def __init__(self, RootPage: _c_vbk.uint64 | None = ..., Count: _c_vbk.uint64 | None = ...): ...
|
|
189
|
+
@overload
|
|
190
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
191
|
+
|
|
192
|
+
class SubFolderHeader(__cs__.Structure):
|
|
193
|
+
RootPage: _c_vbk.uint64
|
|
194
|
+
Count: _c_vbk.uint32
|
|
195
|
+
Data: __cs__.CharArray
|
|
196
|
+
@overload
|
|
197
|
+
def __init__(
|
|
198
|
+
self,
|
|
199
|
+
RootPage: _c_vbk.uint64 | None = ...,
|
|
200
|
+
Count: _c_vbk.uint32 | None = ...,
|
|
201
|
+
Data: __cs__.CharArray | None = ...,
|
|
202
|
+
): ...
|
|
203
|
+
@overload
|
|
204
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
205
|
+
|
|
206
|
+
class ExtFibHeader(__cs__.Structure):
|
|
207
|
+
UpdateInProgress: _c_vbk.uint16
|
|
208
|
+
Unk3: _c_vbk.uint8
|
|
209
|
+
Format: _c_vbk.uint8
|
|
210
|
+
BlocksVector: _c_vbk.BlocksVectorHeader
|
|
211
|
+
FibSize: _c_vbk.uint64
|
|
212
|
+
Size: _c_vbk.uint64
|
|
213
|
+
FsObjAttachState: _c_vbk.uint8
|
|
214
|
+
Data: __cs__.CharArray
|
|
215
|
+
@overload
|
|
216
|
+
def __init__(
|
|
217
|
+
self,
|
|
218
|
+
UpdateInProgress: _c_vbk.uint16 | None = ...,
|
|
219
|
+
Unk3: _c_vbk.uint8 | None = ...,
|
|
220
|
+
Format: _c_vbk.uint8 | None = ...,
|
|
221
|
+
BlocksVector: _c_vbk.BlocksVectorHeader | None = ...,
|
|
222
|
+
FibSize: _c_vbk.uint64 | None = ...,
|
|
223
|
+
Size: _c_vbk.uint64 | None = ...,
|
|
224
|
+
FsObjAttachState: _c_vbk.uint8 | None = ...,
|
|
225
|
+
Data: __cs__.CharArray | None = ...,
|
|
226
|
+
): ...
|
|
227
|
+
@overload
|
|
228
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
229
|
+
|
|
230
|
+
class IntFibHeader(__cs__.Structure):
|
|
231
|
+
UpdateInProgress: _c_vbk.uint16
|
|
232
|
+
Unk3: _c_vbk.uint8
|
|
233
|
+
Format: _c_vbk.uint8
|
|
234
|
+
BlocksVector: _c_vbk.BlocksVectorHeader
|
|
235
|
+
FibSize: _c_vbk.uint64
|
|
236
|
+
Size: _c_vbk.uint64
|
|
237
|
+
FsObjAttachState: _c_vbk.uint8
|
|
238
|
+
Data: __cs__.CharArray
|
|
239
|
+
@overload
|
|
240
|
+
def __init__(
|
|
241
|
+
self,
|
|
242
|
+
UpdateInProgress: _c_vbk.uint16 | None = ...,
|
|
243
|
+
Unk3: _c_vbk.uint8 | None = ...,
|
|
244
|
+
Format: _c_vbk.uint8 | None = ...,
|
|
245
|
+
BlocksVector: _c_vbk.BlocksVectorHeader | None = ...,
|
|
246
|
+
FibSize: _c_vbk.uint64 | None = ...,
|
|
247
|
+
Size: _c_vbk.uint64 | None = ...,
|
|
248
|
+
FsObjAttachState: _c_vbk.uint8 | None = ...,
|
|
249
|
+
Data: __cs__.CharArray | None = ...,
|
|
250
|
+
): ...
|
|
251
|
+
@overload
|
|
252
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
253
|
+
|
|
254
|
+
class PatchHeader(__cs__.Structure):
|
|
255
|
+
Unk0: _c_vbk.uint32
|
|
256
|
+
BlocksVector: _c_vbk.BlocksVectorHeader
|
|
257
|
+
FibSize: _c_vbk.uint64
|
|
258
|
+
Unk4: _c_vbk.uint64
|
|
259
|
+
Data: __cs__.CharArray
|
|
260
|
+
@overload
|
|
261
|
+
def __init__(
|
|
262
|
+
self,
|
|
263
|
+
Unk0: _c_vbk.uint32 | None = ...,
|
|
264
|
+
BlocksVector: _c_vbk.BlocksVectorHeader | None = ...,
|
|
265
|
+
FibSize: _c_vbk.uint64 | None = ...,
|
|
266
|
+
Unk4: _c_vbk.uint64 | None = ...,
|
|
267
|
+
Data: __cs__.CharArray | None = ...,
|
|
268
|
+
): ...
|
|
269
|
+
@overload
|
|
270
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
271
|
+
|
|
272
|
+
class IncrementHeader(__cs__.Structure):
|
|
273
|
+
Unk0: _c_vbk.uint32
|
|
274
|
+
BlocksVector: _c_vbk.BlocksVectorHeader
|
|
275
|
+
FibSize: _c_vbk.uint64
|
|
276
|
+
Unk4: _c_vbk.uint64
|
|
277
|
+
Data: __cs__.CharArray
|
|
278
|
+
@overload
|
|
279
|
+
def __init__(
|
|
280
|
+
self,
|
|
281
|
+
Unk0: _c_vbk.uint32 | None = ...,
|
|
282
|
+
BlocksVector: _c_vbk.BlocksVectorHeader | None = ...,
|
|
283
|
+
FibSize: _c_vbk.uint64 | None = ...,
|
|
284
|
+
Unk4: _c_vbk.uint64 | None = ...,
|
|
285
|
+
Data: __cs__.CharArray | None = ...,
|
|
286
|
+
): ...
|
|
287
|
+
@overload
|
|
288
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
289
|
+
|
|
290
|
+
class DirItemType(__cs__.Enum):
|
|
291
|
+
# None = ...
|
|
292
|
+
SubFolder = ...
|
|
293
|
+
ExtFib = ...
|
|
294
|
+
IntFib = ...
|
|
295
|
+
Patch = ...
|
|
296
|
+
Increment = ...
|
|
297
|
+
|
|
298
|
+
class DirItemRecord(__cs__.Structure):
|
|
299
|
+
Type: _c_vbk.DirItemType
|
|
300
|
+
NameLength: _c_vbk.uint32
|
|
301
|
+
Name: __cs__.CharArray
|
|
302
|
+
PropsRootPage: _c_vbk.int64
|
|
303
|
+
Unk1: _c_vbk.uint32
|
|
304
|
+
Data: __cs__.CharArray
|
|
305
|
+
SubFolder: _c_vbk.SubFolderHeader
|
|
306
|
+
ExtFib: _c_vbk.ExtFibHeader
|
|
307
|
+
IntFib: _c_vbk.IntFibHeader
|
|
308
|
+
Patch: _c_vbk.PatchHeader
|
|
309
|
+
Increment: _c_vbk.IncrementHeader
|
|
310
|
+
@overload
|
|
311
|
+
def __init__(
|
|
312
|
+
self,
|
|
313
|
+
Type: _c_vbk.DirItemType | None = ...,
|
|
314
|
+
NameLength: _c_vbk.uint32 | None = ...,
|
|
315
|
+
Name: __cs__.CharArray | None = ...,
|
|
316
|
+
PropsRootPage: _c_vbk.int64 | None = ...,
|
|
317
|
+
Unk1: _c_vbk.uint32 | None = ...,
|
|
318
|
+
Data: __cs__.CharArray | None = ...,
|
|
319
|
+
SubFolder: _c_vbk.SubFolderHeader | None = ...,
|
|
320
|
+
ExtFib: _c_vbk.ExtFibHeader | None = ...,
|
|
321
|
+
IntFib: _c_vbk.IntFibHeader | None = ...,
|
|
322
|
+
Patch: _c_vbk.PatchHeader | None = ...,
|
|
323
|
+
Increment: _c_vbk.IncrementHeader | None = ...,
|
|
324
|
+
): ...
|
|
325
|
+
@overload
|
|
326
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
327
|
+
|
|
328
|
+
class BlockFlags(__cs__.Flag):
|
|
329
|
+
# None = ...
|
|
330
|
+
Updated = ...
|
|
331
|
+
CommitInProgress = ...
|
|
332
|
+
|
|
333
|
+
class BlockLocationType(__cs__.Enum):
|
|
334
|
+
Normal = ...
|
|
335
|
+
Sparse = ...
|
|
336
|
+
Reserved = ...
|
|
337
|
+
Archived = ...
|
|
338
|
+
BlockInBlob = ...
|
|
339
|
+
BlockInBlobReserved = ...
|
|
340
|
+
|
|
341
|
+
class CompressionType(__cs__.Enum):
|
|
342
|
+
Plain = ...
|
|
343
|
+
RL = ...
|
|
344
|
+
ZLH = ...
|
|
345
|
+
ZLL = ...
|
|
346
|
+
LZ4 = ...
|
|
347
|
+
|
|
348
|
+
class MetaTableDescriptor(__cs__.Structure):
|
|
349
|
+
RootPage: _c_vbk.int64
|
|
350
|
+
BlockSize: _c_vbk.uint64
|
|
351
|
+
Count: _c_vbk.uint64
|
|
352
|
+
@overload
|
|
353
|
+
def __init__(
|
|
354
|
+
self,
|
|
355
|
+
RootPage: _c_vbk.int64 | None = ...,
|
|
356
|
+
BlockSize: _c_vbk.uint64 | None = ...,
|
|
357
|
+
Count: _c_vbk.uint64 | None = ...,
|
|
358
|
+
): ...
|
|
359
|
+
@overload
|
|
360
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
361
|
+
|
|
362
|
+
class StgBlockDescriptor(__cs__.Structure):
|
|
363
|
+
Format: _c_vbk.uint8
|
|
364
|
+
UsageCounter: _c_vbk.uint32
|
|
365
|
+
Offset: _c_vbk.uint64
|
|
366
|
+
AllocatedSize: _c_vbk.uint32
|
|
367
|
+
Deduplication: _c_vbk.uint8
|
|
368
|
+
Digest: __cs__.CharArray
|
|
369
|
+
CompressionType: _c_vbk.CompressionType
|
|
370
|
+
Unk0: _c_vbk.uint8
|
|
371
|
+
CompressedSize: _c_vbk.uint32
|
|
372
|
+
SourceSize: _c_vbk.uint32
|
|
373
|
+
@overload
|
|
374
|
+
def __init__(
|
|
375
|
+
self,
|
|
376
|
+
Format: _c_vbk.uint8 | None = ...,
|
|
377
|
+
UsageCounter: _c_vbk.uint32 | None = ...,
|
|
378
|
+
Offset: _c_vbk.uint64 | None = ...,
|
|
379
|
+
AllocatedSize: _c_vbk.uint32 | None = ...,
|
|
380
|
+
Deduplication: _c_vbk.uint8 | None = ...,
|
|
381
|
+
Digest: __cs__.CharArray | None = ...,
|
|
382
|
+
CompressionType: _c_vbk.CompressionType | None = ...,
|
|
383
|
+
Unk0: _c_vbk.uint8 | None = ...,
|
|
384
|
+
CompressedSize: _c_vbk.uint32 | None = ...,
|
|
385
|
+
SourceSize: _c_vbk.uint32 | None = ...,
|
|
386
|
+
): ...
|
|
387
|
+
@overload
|
|
388
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
389
|
+
|
|
390
|
+
class StgBlockDescriptorV7(__cs__.Structure):
|
|
391
|
+
Format: _c_vbk.uint8
|
|
392
|
+
UsageCounter: _c_vbk.uint32
|
|
393
|
+
Offset: _c_vbk.uint64
|
|
394
|
+
AllocatedSize: _c_vbk.uint32
|
|
395
|
+
Deduplication: _c_vbk.uint8
|
|
396
|
+
Digest: __cs__.CharArray
|
|
397
|
+
CompressionType: _c_vbk.CompressionType
|
|
398
|
+
Unk0: _c_vbk.uint8
|
|
399
|
+
CompressedSize: _c_vbk.uint32
|
|
400
|
+
SourceSize: _c_vbk.uint32
|
|
401
|
+
KeySetId: __cs__.CharArray
|
|
402
|
+
@overload
|
|
403
|
+
def __init__(
|
|
404
|
+
self,
|
|
405
|
+
Format: _c_vbk.uint8 | None = ...,
|
|
406
|
+
UsageCounter: _c_vbk.uint32 | None = ...,
|
|
407
|
+
Offset: _c_vbk.uint64 | None = ...,
|
|
408
|
+
AllocatedSize: _c_vbk.uint32 | None = ...,
|
|
409
|
+
Deduplication: _c_vbk.uint8 | None = ...,
|
|
410
|
+
Digest: __cs__.CharArray | None = ...,
|
|
411
|
+
CompressionType: _c_vbk.CompressionType | None = ...,
|
|
412
|
+
Unk0: _c_vbk.uint8 | None = ...,
|
|
413
|
+
CompressedSize: _c_vbk.uint32 | None = ...,
|
|
414
|
+
SourceSize: _c_vbk.uint32 | None = ...,
|
|
415
|
+
KeySetId: __cs__.CharArray | None = ...,
|
|
416
|
+
): ...
|
|
417
|
+
@overload
|
|
418
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
419
|
+
|
|
420
|
+
class FibBlockDescriptor(__cs__.Structure):
|
|
421
|
+
BlockSize: _c_vbk.uint32
|
|
422
|
+
Type: _c_vbk.BlockLocationType
|
|
423
|
+
Digest: __cs__.CharArray
|
|
424
|
+
BlockId: _c_vbk.uint64
|
|
425
|
+
Flags: _c_vbk.BlockFlags
|
|
426
|
+
@overload
|
|
427
|
+
def __init__(
|
|
428
|
+
self,
|
|
429
|
+
BlockSize: _c_vbk.uint32 | None = ...,
|
|
430
|
+
Type: _c_vbk.BlockLocationType | None = ...,
|
|
431
|
+
Digest: __cs__.CharArray | None = ...,
|
|
432
|
+
BlockId: _c_vbk.uint64 | None = ...,
|
|
433
|
+
Flags: _c_vbk.BlockFlags | None = ...,
|
|
434
|
+
): ...
|
|
435
|
+
@overload
|
|
436
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
437
|
+
|
|
438
|
+
class FibBlockDescriptorV7(__cs__.Structure):
|
|
439
|
+
BlockSize: _c_vbk.uint32
|
|
440
|
+
Type: _c_vbk.BlockLocationType
|
|
441
|
+
Digest: __cs__.CharArray
|
|
442
|
+
BlockId: _c_vbk.uint64
|
|
443
|
+
Flags: _c_vbk.BlockFlags
|
|
444
|
+
KeySetId: __cs__.CharArray
|
|
445
|
+
@overload
|
|
446
|
+
def __init__(
|
|
447
|
+
self,
|
|
448
|
+
BlockSize: _c_vbk.uint32 | None = ...,
|
|
449
|
+
Type: _c_vbk.BlockLocationType | None = ...,
|
|
450
|
+
Digest: __cs__.CharArray | None = ...,
|
|
451
|
+
BlockId: _c_vbk.uint64 | None = ...,
|
|
452
|
+
Flags: _c_vbk.BlockFlags | None = ...,
|
|
453
|
+
KeySetId: __cs__.CharArray | None = ...,
|
|
454
|
+
): ...
|
|
455
|
+
@overload
|
|
456
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
457
|
+
|
|
458
|
+
class PatchBlockDescriptor(__cs__.Structure):
|
|
459
|
+
@overload
|
|
460
|
+
def __init__(self): ...
|
|
461
|
+
@overload
|
|
462
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
463
|
+
|
|
464
|
+
class PatchBlockDescriptorV7(__cs__.Structure):
|
|
465
|
+
@overload
|
|
466
|
+
def __init__(self): ...
|
|
467
|
+
@overload
|
|
468
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
469
|
+
|
|
470
|
+
class PropertyType(__cs__.Enum):
|
|
471
|
+
UInt32 = ...
|
|
472
|
+
UInt64 = ...
|
|
473
|
+
AString = ...
|
|
474
|
+
WString = ...
|
|
475
|
+
Binary = ...
|
|
476
|
+
Boolean = ...
|
|
477
|
+
End = ...
|
|
478
|
+
|
|
479
|
+
# Technically `c_vbk` is an instance of `_c_vbk`, but then we can't use it in type hints
|
|
480
|
+
c_vbk: TypeAlias = _c_vbk
|
|
481
|
+
|
|
482
|
+
PAGE_SIZE = c_vbk.PAGE_SIZE
|
{dissect_archive-1.9.dev4/dissect/archive → dissect_archive-1.9.dev5/dissect/archive/vbk}/vbk.py
RENAMED
|
@@ -13,8 +13,8 @@ from dissect.util.hash.crc32c import crc32c
|
|
|
13
13
|
from dissect.util.stream import AlignedStream
|
|
14
14
|
from dissect.util.xmemoryview import xmemoryview
|
|
15
15
|
|
|
16
|
-
from dissect.archive.
|
|
17
|
-
from dissect.archive.
|
|
16
|
+
from dissect.archive.exception import Error, FileNotFoundError, IsADirectoryError, NotADirectoryError
|
|
17
|
+
from dissect.archive.vbk.c_vbk import PAGE_SIZE, c_vbk
|
|
18
18
|
|
|
19
19
|
if TYPE_CHECKING:
|
|
20
20
|
from collections.abc import Iterator
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Generated by cstruct-stubgen
|
|
2
|
+
from typing import BinaryIO, Literal, TypeAlias, overload
|
|
3
|
+
|
|
4
|
+
import dissect.cstruct as __cs__
|
|
5
|
+
|
|
6
|
+
class _c_vma(__cs__.cstruct):
|
|
7
|
+
VMA_BLOCK_BITS: Literal[12] = ...
|
|
8
|
+
VMA_BLOCK_SIZE: Literal[4096] = ...
|
|
9
|
+
VMA_CLUSTER_BITS: Literal[16] = ...
|
|
10
|
+
VMA_CLUSTER_SIZE: Literal[65536] = ...
|
|
11
|
+
VMA_EXTENT_HEADER_SIZE: Literal[512] = ...
|
|
12
|
+
VMA_BLOCKS_PER_EXTENT: Literal[59] = ...
|
|
13
|
+
VMA_MAX_CONFIGS: Literal[256] = ...
|
|
14
|
+
VMA_MAX_EXTENT_SIZE: Literal[3867136] = ...
|
|
15
|
+
class VmaDeviceInfoHeader(__cs__.Structure):
|
|
16
|
+
devname_ptr: _c_vma.uint32
|
|
17
|
+
reserved0: _c_vma.uint32
|
|
18
|
+
size: _c_vma.uint64
|
|
19
|
+
reserved1: _c_vma.uint64
|
|
20
|
+
reserved2: _c_vma.uint64
|
|
21
|
+
@overload
|
|
22
|
+
def __init__(
|
|
23
|
+
self,
|
|
24
|
+
devname_ptr: _c_vma.uint32 | None = ...,
|
|
25
|
+
reserved0: _c_vma.uint32 | None = ...,
|
|
26
|
+
size: _c_vma.uint64 | None = ...,
|
|
27
|
+
reserved1: _c_vma.uint64 | None = ...,
|
|
28
|
+
reserved2: _c_vma.uint64 | None = ...,
|
|
29
|
+
): ...
|
|
30
|
+
@overload
|
|
31
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
32
|
+
|
|
33
|
+
class VmaHeader(__cs__.Structure):
|
|
34
|
+
magic: __cs__.CharArray
|
|
35
|
+
version: _c_vma.uint32
|
|
36
|
+
uuid: __cs__.CharArray
|
|
37
|
+
ctime: _c_vma.int64
|
|
38
|
+
md5sum: __cs__.CharArray
|
|
39
|
+
blob_buffer_offset: _c_vma.uint32
|
|
40
|
+
blob_buffer_size: _c_vma.uint32
|
|
41
|
+
header_size: _c_vma.uint32
|
|
42
|
+
_reserved1: __cs__.CharArray
|
|
43
|
+
config_names: __cs__.Array[_c_vma.uint32]
|
|
44
|
+
config_data: __cs__.Array[_c_vma.uint32]
|
|
45
|
+
_reserved2: __cs__.CharArray
|
|
46
|
+
dev_info: __cs__.Array[_c_vma.VmaDeviceInfoHeader]
|
|
47
|
+
@overload
|
|
48
|
+
def __init__(
|
|
49
|
+
self,
|
|
50
|
+
magic: __cs__.CharArray | None = ...,
|
|
51
|
+
version: _c_vma.uint32 | None = ...,
|
|
52
|
+
uuid: __cs__.CharArray | None = ...,
|
|
53
|
+
ctime: _c_vma.int64 | None = ...,
|
|
54
|
+
md5sum: __cs__.CharArray | None = ...,
|
|
55
|
+
blob_buffer_offset: _c_vma.uint32 | None = ...,
|
|
56
|
+
blob_buffer_size: _c_vma.uint32 | None = ...,
|
|
57
|
+
header_size: _c_vma.uint32 | None = ...,
|
|
58
|
+
_reserved1: __cs__.CharArray | None = ...,
|
|
59
|
+
config_names: __cs__.Array[_c_vma.uint32] | None = ...,
|
|
60
|
+
config_data: __cs__.Array[_c_vma.uint32] | None = ...,
|
|
61
|
+
_reserved2: __cs__.CharArray | None = ...,
|
|
62
|
+
dev_info: __cs__.Array[_c_vma.VmaDeviceInfoHeader] | None = ...,
|
|
63
|
+
): ...
|
|
64
|
+
@overload
|
|
65
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
66
|
+
|
|
67
|
+
class VmaExtentHeader(__cs__.Structure):
|
|
68
|
+
magic: __cs__.CharArray
|
|
69
|
+
reserved1: _c_vma.uint16
|
|
70
|
+
block_count: _c_vma.uint16
|
|
71
|
+
uuid: __cs__.CharArray
|
|
72
|
+
md5sum: __cs__.CharArray
|
|
73
|
+
blockinfo: __cs__.Array[_c_vma.uint64]
|
|
74
|
+
@overload
|
|
75
|
+
def __init__(
|
|
76
|
+
self,
|
|
77
|
+
magic: __cs__.CharArray | None = ...,
|
|
78
|
+
reserved1: _c_vma.uint16 | None = ...,
|
|
79
|
+
block_count: _c_vma.uint16 | None = ...,
|
|
80
|
+
uuid: __cs__.CharArray | None = ...,
|
|
81
|
+
md5sum: __cs__.CharArray | None = ...,
|
|
82
|
+
blockinfo: __cs__.Array[_c_vma.uint64] | None = ...,
|
|
83
|
+
): ...
|
|
84
|
+
@overload
|
|
85
|
+
def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
|
|
86
|
+
|
|
87
|
+
# Technically `c_vma` is an instance of `_c_vma`, but then we can't use it in type hints
|
|
88
|
+
c_vma: TypeAlias = _c_vma
|
|
89
|
+
|
|
90
|
+
VMA_MAGIC: Literal[b"VMA\x00"] = ...
|
|
91
|
+
VMA_EXTENT_MAGIC: Literal[b"VMAE"] = ...
|
{dissect_archive-1.9.dev4/dissect/archive → dissect_archive-1.9.dev5/dissect/archive/vma}/vma.py
RENAMED
|
@@ -13,8 +13,8 @@ from uuid import UUID
|
|
|
13
13
|
from dissect.util import ts
|
|
14
14
|
from dissect.util.stream import AlignedStream
|
|
15
15
|
|
|
16
|
-
from dissect.archive.
|
|
17
|
-
from dissect.archive.
|
|
16
|
+
from dissect.archive.exception import InvalidHeaderError
|
|
17
|
+
from dissect.archive.vma.c_vma import VMA_EXTENT_MAGIC, VMA_MAGIC, c_vma
|
|
18
18
|
|
|
19
19
|
if TYPE_CHECKING:
|
|
20
20
|
from collections.abc import Iterator
|