dissect.extfs 3.16.dev2__tar.gz → 3.16.dev3__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.
Files changed (36) hide show
  1. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/PKG-INFO +3 -3
  2. dissect_extfs-3.16.dev3/dissect/extfs/c_ext.pyi +681 -0
  3. dissect_extfs-3.16.dev3/dissect/extfs/c_jdb2.pyi +154 -0
  4. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/dissect.extfs.egg-info/PKG-INFO +3 -3
  5. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/dissect.extfs.egg-info/SOURCES.txt +4 -0
  6. dissect_extfs-3.16.dev3/dissect.extfs.egg-info/requires.txt +6 -0
  7. dissect_extfs-3.16.dev3/dissect.extfs.egg-info/scm_file_list.json +33 -0
  8. dissect_extfs-3.16.dev3/dissect.extfs.egg-info/scm_version.json +8 -0
  9. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/pyproject.toml +3 -2
  10. dissect_extfs-3.16.dev2/dissect.extfs.egg-info/requires.txt +0 -6
  11. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/.git-blame-ignore-revs +0 -0
  12. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/.gitattributes +0 -0
  13. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/COPYRIGHT +0 -0
  14. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/LICENSE +0 -0
  15. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/MANIFEST.in +0 -0
  16. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/README.md +0 -0
  17. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/dissect/extfs/__init__.py +0 -0
  18. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/dissect/extfs/c_ext.py +0 -0
  19. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/dissect/extfs/c_jdb2.py +0 -0
  20. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/dissect/extfs/exceptions.py +0 -0
  21. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/dissect/extfs/extfs.py +0 -0
  22. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/dissect/extfs/journal.py +0 -0
  23. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/dissect.extfs.egg-info/dependency_links.txt +0 -0
  24. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/dissect.extfs.egg-info/top_level.txt +0 -0
  25. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/setup.cfg +0 -0
  26. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/tests/__init__.py +0 -0
  27. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/tests/_docs/Makefile +0 -0
  28. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/tests/_docs/conf.py +0 -0
  29. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/tests/_docs/index.rst +0 -0
  30. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/tests/conftest.py +0 -0
  31. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/tests/data/ext4.bin.gz +0 -0
  32. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/tests/data/ext4_sparse.bin.gz +0 -0
  33. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/tests/data/ext4_symlink_test.bin.gz +0 -0
  34. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/tests/test_exceptions.py +0 -0
  35. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/tests/test_ext4.py +0 -0
  36. {dissect_extfs-3.16.dev2 → dissect_extfs-3.16.dev3}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dissect.extfs
3
- Version: 3.16.dev2
3
+ Version: 3.16.dev3
4
4
  Summary: A Dissect module implementing a parser for the ExtFS file system, the native filesystem for Linux operating systems
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,>=4
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<5.0.dev,>=4.0.dev; extra == "dev"
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
 
@@ -0,0 +1,681 @@
1
+ # Generated by cstruct-stubgen
2
+ from typing import BinaryIO, Literal, TypeAlias, overload
3
+
4
+ import dissect.cstruct as __cs__
5
+
6
+ class _c_ext(__cs__.cstruct):
7
+ EXT2_SBOFF: Literal[1024] = ...
8
+ EXT2_FS_MAGIC: Literal[61267] = ...
9
+ EXT2_BAD_INO: Literal[1] = ...
10
+ EXT2_ROOT_INO: Literal[2] = ...
11
+ EXT4_USR_QUOTA_INO: Literal[3] = ...
12
+ EXT4_GRP_QUOTA_INO: Literal[4] = ...
13
+ EXT2_BOOT_LOADER_INO: Literal[5] = ...
14
+ EXT2_UNDEL_DIR_INO: Literal[6] = ...
15
+ EXT2_RESIZE_INO: Literal[7] = ...
16
+ EXT2_JOURNAL_INO: Literal[8] = ...
17
+ EXT2_NDIR_BLOCKS: Literal[12] = ...
18
+ EXT2_NIND_BLOCKS: Literal[3] = ...
19
+ EXT2_NAME_LEN: Literal[255] = ...
20
+ EXT2_MIN_BLOCK_SIZE: Literal[1024] = ...
21
+ EXT2_MAX_BLOCK_SIZE: Literal[4096] = ...
22
+ EXT4_MAX_BLOCK_SIZE: Literal[65536] = ...
23
+ EXT2_FEATURE_COMPAT_DIR_PREALLOC: Literal[1] = ...
24
+ EXT2_FEATURE_COMPAT_IMAGIC_INODES: Literal[2] = ...
25
+ EXT3_FEATURE_COMPAT_HAS_JOURNAL: Literal[4] = ...
26
+ EXT2_FEATURE_COMPAT_EXT_ATTR: Literal[8] = ...
27
+ EXT2_FEATURE_COMPAT_RESIZE_INODE: Literal[16] = ...
28
+ EXT2_FEATURE_COMPAT_DIR_INDEX: Literal[32] = ...
29
+ EXT4_FEATURE_COMPAT_SPARSE_SUPER2: Literal[512] = ...
30
+ EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER: Literal[1] = ...
31
+ EXT2_FEATURE_RO_COMPAT_LARGE_FILE: Literal[2] = ...
32
+ EXT2_FEATURE_RO_COMPAT_BTREE_DIR: Literal[4] = ...
33
+ EXT2_FEATURE_RO_COMPAT_HUGE_FILE: Literal[8] = ...
34
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM: Literal[16] = ...
35
+ EXT4_FEATURE_RO_COMPAT_DIR_NLINK: Literal[32] = ...
36
+ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE: Literal[64] = ...
37
+ EXT4_FEATURE_RO_COMPAT_QUOTA: Literal[256] = ...
38
+ EXT4_FEATURE_RO_COMPAT_BIGALLOC: Literal[512] = ...
39
+ EXT4_FEATURE_RO_COMPAT_METADATA_CSUM: Literal[1024] = ...
40
+ EXT4_FEATURE_RO_COMPAT_READONLY: Literal[4096] = ...
41
+ EXT4_FEATURE_RO_COMPAT_PROJECT: Literal[8192] = ...
42
+ EXT2_FEATURE_INCOMPAT_COMPRESSION: Literal[1] = ...
43
+ EXT2_FEATURE_INCOMPAT_FILETYPE: Literal[2] = ...
44
+ EXT3_FEATURE_INCOMPAT_RECOVER: Literal[4] = ...
45
+ EXT3_FEATURE_INCOMPAT_JOURNAL_DEV: Literal[8] = ...
46
+ EXT2_FEATURE_INCOMPAT_META_BG: Literal[16] = ...
47
+ EXT4_FEATURE_INCOMPAT_EXTENTS: Literal[64] = ...
48
+ EXT4_FEATURE_INCOMPAT_64BIT: Literal[128] = ...
49
+ EXT4_FEATURE_INCOMPAT_MMP: Literal[256] = ...
50
+ EXT4_FEATURE_INCOMPAT_FLEX_BG: Literal[512] = ...
51
+ EXT4_FEATURE_INCOMPAT_EA_INODE: Literal[1024] = ...
52
+ EXT4_FEATURE_INCOMPAT_DIRDATA: Literal[4096] = ...
53
+ EXT4_FEATURE_INCOMPAT_CSUM_SEED: Literal[8192] = ...
54
+ EXT4_FEATURE_INCOMPAT_LARGEDIR: Literal[16384] = ...
55
+ EXT4_FEATURE_INCOMPAT_INLINE_DATA: Literal[32768] = ...
56
+ EXT4_FEATURE_INCOMPAT_ENCRYPT: Literal[65536] = ...
57
+ EXT2_FT_FMT: Literal[61440] = ...
58
+ EXT2_FT_SOCK: Literal[49152] = ...
59
+ EXT2_FT_LNK: Literal[40960] = ...
60
+ EXT2_FT_REG: Literal[32768] = ...
61
+ EXT2_FT_BLK: Literal[24576] = ...
62
+ EXT2_FT_DIR: Literal[16384] = ...
63
+ EXT2_FT_CHR: Literal[8192] = ...
64
+ EXT2_FT_FIFO: Literal[4096] = ...
65
+ EXT2_SECRM_FL: Literal[1] = ...
66
+ EXT2_UNRM_FL: Literal[2] = ...
67
+ EXT2_COMPR_FL: Literal[4] = ...
68
+ EXT2_SYNC_FL: Literal[8] = ...
69
+ EXT2_IMMUTABLE_FL: Literal[16] = ...
70
+ EXT2_APPEND_FL: Literal[32] = ...
71
+ EXT2_NODUMP_FL: Literal[64] = ...
72
+ EXT2_NOATIME_FL: Literal[128] = ...
73
+ EXT2_DIRTY_FL: Literal[256] = ...
74
+ EXT2_COMPRBLK_FL: Literal[512] = ...
75
+ EXT2_NOCOMP_FL: Literal[1024] = ...
76
+ EXT2_ECOMPR_FL: Literal[2048] = ...
77
+ EXT4_ENCRYPT_FL: Literal[2048] = ...
78
+ EXT2_BTREE_FL: Literal[4096] = ...
79
+ EXT4_INDEX_FL: Literal[4096] = ...
80
+ EXT2_IMAGIC_FL: Literal[8192] = ...
81
+ EXT2_JOURNAL_DATA_FL: Literal[16384] = ...
82
+ EXT2_NOTAIL_FL: Literal[32768] = ...
83
+ EXT2_DIRSYNC_FL: Literal[65536] = ...
84
+ EXT2_TOPDIR_FL: Literal[131072] = ...
85
+ EXT4_HUGE_FILE_FL: Literal[262144] = ...
86
+ EXT4_EXTENTS_FL: Literal[524288] = ...
87
+ EXT4_EA_INODE_FL: Literal[2097152] = ...
88
+ EXT4_EOFBLOCKS_FL: Literal[4194304] = ...
89
+ EXT4_INLINE_DATA_FL: Literal[268435456] = ...
90
+ EXT4_PROJINHERIT_FL: Literal[536870912] = ...
91
+ EXT2_RESERVED_FL: Literal[2147483648] = ...
92
+ EXT2_FL_USER_VISIBLE: Literal[810278911] = ...
93
+ EXT2_FL_USER_MODIFIABLE: Literal[541835519] = ...
94
+ EXT4_XATTR_MAGIC: Literal[3925999616] = ...
95
+ EXT4_XATTR_INDEX_USER: Literal[1] = ...
96
+ EXT4_XATTR_INDEX_POSIX_ACL_ACCESS: Literal[2] = ...
97
+ EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT: Literal[3] = ...
98
+ EXT4_XATTR_INDEX_TRUSTED: Literal[4] = ...
99
+ EXT4_XATTR_INDEX_LUSTRE: Literal[5] = ...
100
+ EXT4_XATTR_INDEX_SECURITY: Literal[6] = ...
101
+ EXT4_XATTR_INDEX_SYSTEM: Literal[7] = ...
102
+ EXT4_XATTR_INDEX_RICHACL: Literal[8] = ...
103
+ EXT4_XATTR_INDEX_ENCRYPTION: Literal[9] = ...
104
+ EXT4_XATTR_INDEX_HURD: Literal[10] = ...
105
+ XATTR_HURD_PREFIX: Literal["gnu."] = ...
106
+ XATTR_SECURITY_PREFIX: Literal["security."] = ...
107
+ XATTR_SYSTEM_PREFIX: Literal["system."] = ...
108
+ XATTR_TRUSTED_PREFIX: Literal["trusted."] = ...
109
+ XATTR_USER_PREFIX: Literal["user."] = ...
110
+ XATTR_POSIX_ACL_ACCESS: Literal["posix_acl_access"] = ...
111
+ XATTR_POSIX_ACL_DEFAULT: Literal["posix_acl_default"] = ...
112
+ EXT4_XATTR_PAD_BITS: Literal[2] = ...
113
+ EXT4_XATTR_PAD: Literal[4] = ...
114
+ EXT4_XATTR_ROUND: Literal[3] = ...
115
+ class ext4_super_block(__cs__.Structure):
116
+ s_inodes_count: _c_ext.uint32
117
+ s_blocks_count_lo: _c_ext.uint32
118
+ s_r_blocks_count_lo: _c_ext.uint32
119
+ s_free_blocks_count_lo: _c_ext.uint32
120
+ s_free_inodes_count: _c_ext.uint32
121
+ s_first_data_block: _c_ext.uint32
122
+ s_log_block_size: _c_ext.uint32
123
+ s_log_cluster_size: _c_ext.uint32
124
+ s_blocks_per_group: _c_ext.uint32
125
+ s_clusters_per_group: _c_ext.uint32
126
+ s_inodes_per_group: _c_ext.uint32
127
+ s_mtime: _c_ext.uint32
128
+ s_wtime: _c_ext.uint32
129
+ s_mnt_count: _c_ext.uint16
130
+ s_max_mnt_count: _c_ext.uint16
131
+ s_magic: _c_ext.uint16
132
+ s_state: _c_ext.uint16
133
+ s_errors: _c_ext.uint16
134
+ s_minor_rev_level: _c_ext.uint16
135
+ s_lastcheck: _c_ext.uint32
136
+ s_checkinterval: _c_ext.uint32
137
+ s_creator_os: _c_ext.uint32
138
+ s_rev_level: _c_ext.uint32
139
+ s_def_resuid: _c_ext.uint16
140
+ s_def_resgid: _c_ext.uint16
141
+ s_first_ino: _c_ext.uint32
142
+ s_inode_size: _c_ext.uint16
143
+ s_block_group_nr: _c_ext.uint16
144
+ s_feature_compat: _c_ext.uint32
145
+ s_feature_incompat: _c_ext.uint32
146
+ s_feature_ro_compat: _c_ext.uint32
147
+ s_uuid: __cs__.CharArray
148
+ s_volume_name: __cs__.CharArray
149
+ s_last_mounted: __cs__.CharArray
150
+ s_algorithm_usage_bitmap: _c_ext.uint32
151
+ s_prealloc_blocks: _c_ext.uint8
152
+ s_prealloc_dir_blocks: _c_ext.uint8
153
+ s_reserved_gdt_blocks: _c_ext.uint16
154
+ s_journal_uuid: __cs__.CharArray
155
+ s_journal_inum: _c_ext.uint32
156
+ s_journal_dev: _c_ext.uint32
157
+ s_last_orphan: _c_ext.uint32
158
+ s_hash_seed: __cs__.CharArray
159
+ s_def_hash_version: _c_ext.uint8
160
+ s_jnl_backup_type: _c_ext.uint8
161
+ s_desc_size: _c_ext.uint16
162
+ s_default_mount_opts: _c_ext.uint32
163
+ s_first_meta_bg: _c_ext.uint32
164
+ s_mkfs_time: _c_ext.uint32
165
+ s_jnl_blocks: __cs__.Array[_c_ext.uint32]
166
+ s_blocks_count_hi: _c_ext.uint32
167
+ s_r_blocks_count_hi: _c_ext.uint32
168
+ s_free_blocks_count_hi: _c_ext.uint32
169
+ s_min_extra_isize: _c_ext.uint16
170
+ s_want_extra_isize: _c_ext.uint16
171
+ s_flags: _c_ext.uint32
172
+ s_raid_stride: _c_ext.uint16
173
+ s_mmp_update_interval: _c_ext.uint16
174
+ s_mmp_block: _c_ext.uint64
175
+ s_raid_stripe_width: _c_ext.uint32
176
+ s_log_groups_per_flex: _c_ext.uint8
177
+ s_checksum_type: _c_ext.uint8
178
+ s_encryption_level: _c_ext.uint8
179
+ s_reserved_pad: _c_ext.uint8
180
+ s_kbytes_written: _c_ext.uint64
181
+ s_snapshot_inum: _c_ext.uint32
182
+ s_snapshot_id: _c_ext.uint32
183
+ s_snapshot_r_blocks_count: _c_ext.uint64
184
+ s_snapshot_list: _c_ext.uint32
185
+ s_error_count: _c_ext.uint32
186
+ s_first_error_time: _c_ext.uint32
187
+ s_first_error_ino: _c_ext.uint32
188
+ s_first_error_block: _c_ext.uint64
189
+ s_first_error_func: __cs__.Array[_c_ext.uint8]
190
+ s_first_error_line: _c_ext.uint32
191
+ s_last_error_time: _c_ext.uint32
192
+ s_last_error_ino: _c_ext.uint32
193
+ s_last_error_line: _c_ext.uint32
194
+ s_last_error_block: _c_ext.uint64
195
+ s_last_error_func: __cs__.Array[_c_ext.uint8]
196
+ s_mount_opts: __cs__.Array[_c_ext.uint8]
197
+ s_usr_quota_inum: _c_ext.uint32
198
+ s_grp_quota_inum: _c_ext.uint32
199
+ s_overhead_clusters: _c_ext.uint32
200
+ s_backup_bgs: __cs__.Array[_c_ext.uint32]
201
+ s_encrypt_algos: __cs__.Array[_c_ext.uint8]
202
+ s_encrypt_pw_salt: __cs__.Array[_c_ext.uint8]
203
+ s_lpf_ino: _c_ext.uint32
204
+ s_prj_quota_inum: _c_ext.uint32
205
+ s_checksum_seed: _c_ext.uint32
206
+ s_reserved: __cs__.Array[_c_ext.uint32]
207
+ s_checksum: _c_ext.uint32
208
+ @overload
209
+ def __init__(
210
+ self,
211
+ /,
212
+ s_inodes_count: _c_ext.uint32 | None = ...,
213
+ s_blocks_count_lo: _c_ext.uint32 | None = ...,
214
+ s_r_blocks_count_lo: _c_ext.uint32 | None = ...,
215
+ s_free_blocks_count_lo: _c_ext.uint32 | None = ...,
216
+ s_free_inodes_count: _c_ext.uint32 | None = ...,
217
+ s_first_data_block: _c_ext.uint32 | None = ...,
218
+ s_log_block_size: _c_ext.uint32 | None = ...,
219
+ s_log_cluster_size: _c_ext.uint32 | None = ...,
220
+ s_blocks_per_group: _c_ext.uint32 | None = ...,
221
+ s_clusters_per_group: _c_ext.uint32 | None = ...,
222
+ s_inodes_per_group: _c_ext.uint32 | None = ...,
223
+ s_mtime: _c_ext.uint32 | None = ...,
224
+ s_wtime: _c_ext.uint32 | None = ...,
225
+ s_mnt_count: _c_ext.uint16 | None = ...,
226
+ s_max_mnt_count: _c_ext.uint16 | None = ...,
227
+ s_magic: _c_ext.uint16 | None = ...,
228
+ s_state: _c_ext.uint16 | None = ...,
229
+ s_errors: _c_ext.uint16 | None = ...,
230
+ s_minor_rev_level: _c_ext.uint16 | None = ...,
231
+ s_lastcheck: _c_ext.uint32 | None = ...,
232
+ s_checkinterval: _c_ext.uint32 | None = ...,
233
+ s_creator_os: _c_ext.uint32 | None = ...,
234
+ s_rev_level: _c_ext.uint32 | None = ...,
235
+ s_def_resuid: _c_ext.uint16 | None = ...,
236
+ s_def_resgid: _c_ext.uint16 | None = ...,
237
+ s_first_ino: _c_ext.uint32 | None = ...,
238
+ s_inode_size: _c_ext.uint16 | None = ...,
239
+ s_block_group_nr: _c_ext.uint16 | None = ...,
240
+ s_feature_compat: _c_ext.uint32 | None = ...,
241
+ s_feature_incompat: _c_ext.uint32 | None = ...,
242
+ s_feature_ro_compat: _c_ext.uint32 | None = ...,
243
+ s_uuid: __cs__.CharArray | None = ...,
244
+ s_volume_name: __cs__.CharArray | None = ...,
245
+ s_last_mounted: __cs__.CharArray | None = ...,
246
+ s_algorithm_usage_bitmap: _c_ext.uint32 | None = ...,
247
+ s_prealloc_blocks: _c_ext.uint8 | None = ...,
248
+ s_prealloc_dir_blocks: _c_ext.uint8 | None = ...,
249
+ s_reserved_gdt_blocks: _c_ext.uint16 | None = ...,
250
+ s_journal_uuid: __cs__.CharArray | None = ...,
251
+ s_journal_inum: _c_ext.uint32 | None = ...,
252
+ s_journal_dev: _c_ext.uint32 | None = ...,
253
+ s_last_orphan: _c_ext.uint32 | None = ...,
254
+ s_hash_seed: __cs__.CharArray | None = ...,
255
+ s_def_hash_version: _c_ext.uint8 | None = ...,
256
+ s_jnl_backup_type: _c_ext.uint8 | None = ...,
257
+ s_desc_size: _c_ext.uint16 | None = ...,
258
+ s_default_mount_opts: _c_ext.uint32 | None = ...,
259
+ s_first_meta_bg: _c_ext.uint32 | None = ...,
260
+ s_mkfs_time: _c_ext.uint32 | None = ...,
261
+ s_jnl_blocks: __cs__.Array[_c_ext.uint32] | None = ...,
262
+ s_blocks_count_hi: _c_ext.uint32 | None = ...,
263
+ s_r_blocks_count_hi: _c_ext.uint32 | None = ...,
264
+ s_free_blocks_count_hi: _c_ext.uint32 | None = ...,
265
+ s_min_extra_isize: _c_ext.uint16 | None = ...,
266
+ s_want_extra_isize: _c_ext.uint16 | None = ...,
267
+ s_flags: _c_ext.uint32 | None = ...,
268
+ s_raid_stride: _c_ext.uint16 | None = ...,
269
+ s_mmp_update_interval: _c_ext.uint16 | None = ...,
270
+ s_mmp_block: _c_ext.uint64 | None = ...,
271
+ s_raid_stripe_width: _c_ext.uint32 | None = ...,
272
+ s_log_groups_per_flex: _c_ext.uint8 | None = ...,
273
+ s_checksum_type: _c_ext.uint8 | None = ...,
274
+ s_encryption_level: _c_ext.uint8 | None = ...,
275
+ s_reserved_pad: _c_ext.uint8 | None = ...,
276
+ s_kbytes_written: _c_ext.uint64 | None = ...,
277
+ s_snapshot_inum: _c_ext.uint32 | None = ...,
278
+ s_snapshot_id: _c_ext.uint32 | None = ...,
279
+ s_snapshot_r_blocks_count: _c_ext.uint64 | None = ...,
280
+ s_snapshot_list: _c_ext.uint32 | None = ...,
281
+ s_error_count: _c_ext.uint32 | None = ...,
282
+ s_first_error_time: _c_ext.uint32 | None = ...,
283
+ s_first_error_ino: _c_ext.uint32 | None = ...,
284
+ s_first_error_block: _c_ext.uint64 | None = ...,
285
+ s_first_error_func: __cs__.Array[_c_ext.uint8] | None = ...,
286
+ s_first_error_line: _c_ext.uint32 | None = ...,
287
+ s_last_error_time: _c_ext.uint32 | None = ...,
288
+ s_last_error_ino: _c_ext.uint32 | None = ...,
289
+ s_last_error_line: _c_ext.uint32 | None = ...,
290
+ s_last_error_block: _c_ext.uint64 | None = ...,
291
+ s_last_error_func: __cs__.Array[_c_ext.uint8] | None = ...,
292
+ s_mount_opts: __cs__.Array[_c_ext.uint8] | None = ...,
293
+ s_usr_quota_inum: _c_ext.uint32 | None = ...,
294
+ s_grp_quota_inum: _c_ext.uint32 | None = ...,
295
+ s_overhead_clusters: _c_ext.uint32 | None = ...,
296
+ s_backup_bgs: __cs__.Array[_c_ext.uint32] | None = ...,
297
+ s_encrypt_algos: __cs__.Array[_c_ext.uint8] | None = ...,
298
+ s_encrypt_pw_salt: __cs__.Array[_c_ext.uint8] | None = ...,
299
+ s_lpf_ino: _c_ext.uint32 | None = ...,
300
+ s_prj_quota_inum: _c_ext.uint32 | None = ...,
301
+ s_checksum_seed: _c_ext.uint32 | None = ...,
302
+ s_reserved: __cs__.Array[_c_ext.uint32] | None = ...,
303
+ s_checksum: _c_ext.uint32 | None = ...,
304
+ ): ...
305
+ @overload
306
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
307
+
308
+ class ext2_group_desc(__cs__.Structure):
309
+ bg_block_bitmap_lo: _c_ext.uint32
310
+ bg_inode_bitmap_lo: _c_ext.uint32
311
+ bg_inode_table_lo: _c_ext.uint32
312
+ bg_free_blocks_count_lo: _c_ext.uint16
313
+ bg_free_inodes_count_lo: _c_ext.uint16
314
+ bg_used_dirs_count_lo: _c_ext.uint16
315
+ bg_pad: _c_ext.uint16
316
+ bg_reserved: __cs__.Array[_c_ext.uint32]
317
+ @overload
318
+ def __init__(
319
+ self,
320
+ /,
321
+ bg_block_bitmap_lo: _c_ext.uint32 | None = ...,
322
+ bg_inode_bitmap_lo: _c_ext.uint32 | None = ...,
323
+ bg_inode_table_lo: _c_ext.uint32 | None = ...,
324
+ bg_free_blocks_count_lo: _c_ext.uint16 | None = ...,
325
+ bg_free_inodes_count_lo: _c_ext.uint16 | None = ...,
326
+ bg_used_dirs_count_lo: _c_ext.uint16 | None = ...,
327
+ bg_pad: _c_ext.uint16 | None = ...,
328
+ bg_reserved: __cs__.Array[_c_ext.uint32] | None = ...,
329
+ ): ...
330
+ @overload
331
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
332
+
333
+ class ext4_group_desc(__cs__.Structure):
334
+ bg_block_bitmap_lo: _c_ext.uint32
335
+ bg_inode_bitmap_lo: _c_ext.uint32
336
+ bg_inode_table_lo: _c_ext.uint32
337
+ bg_free_blocks_count_lo: _c_ext.uint16
338
+ bg_free_inodes_count_lo: _c_ext.uint16
339
+ bg_used_dirs_count_lo: _c_ext.uint16
340
+ bg_flags: _c_ext.uint16
341
+ bg_exclude_bitmap_lo: _c_ext.uint32
342
+ bg_block_bitmap_csum_lo: _c_ext.uint16
343
+ bg_inode_bitmap_csum_lo: _c_ext.uint16
344
+ bg_itable_unused_lo: _c_ext.uint16
345
+ bg_checksum: _c_ext.uint16
346
+ bg_block_bitmap_hi: _c_ext.uint32
347
+ bg_inode_bitmap_hi: _c_ext.uint32
348
+ bg_inode_table_hi: _c_ext.uint32
349
+ bg_free_blocks_count_hi: _c_ext.uint16
350
+ bg_free_inodes_count_hi: _c_ext.uint16
351
+ bg_used_dirs_count_hi: _c_ext.uint16
352
+ bg_itable_unused_hi: _c_ext.uint16
353
+ bg_exclude_bitmap_hi: _c_ext.uint32
354
+ bg_block_bitmap_csum_hi: _c_ext.uint16
355
+ bg_inode_bitmap_csum_hi: _c_ext.uint16
356
+ bg_reserved: _c_ext.uint32
357
+ @overload
358
+ def __init__(
359
+ self,
360
+ /,
361
+ bg_block_bitmap_lo: _c_ext.uint32 | None = ...,
362
+ bg_inode_bitmap_lo: _c_ext.uint32 | None = ...,
363
+ bg_inode_table_lo: _c_ext.uint32 | None = ...,
364
+ bg_free_blocks_count_lo: _c_ext.uint16 | None = ...,
365
+ bg_free_inodes_count_lo: _c_ext.uint16 | None = ...,
366
+ bg_used_dirs_count_lo: _c_ext.uint16 | None = ...,
367
+ bg_flags: _c_ext.uint16 | None = ...,
368
+ bg_exclude_bitmap_lo: _c_ext.uint32 | None = ...,
369
+ bg_block_bitmap_csum_lo: _c_ext.uint16 | None = ...,
370
+ bg_inode_bitmap_csum_lo: _c_ext.uint16 | None = ...,
371
+ bg_itable_unused_lo: _c_ext.uint16 | None = ...,
372
+ bg_checksum: _c_ext.uint16 | None = ...,
373
+ bg_block_bitmap_hi: _c_ext.uint32 | None = ...,
374
+ bg_inode_bitmap_hi: _c_ext.uint32 | None = ...,
375
+ bg_inode_table_hi: _c_ext.uint32 | None = ...,
376
+ bg_free_blocks_count_hi: _c_ext.uint16 | None = ...,
377
+ bg_free_inodes_count_hi: _c_ext.uint16 | None = ...,
378
+ bg_used_dirs_count_hi: _c_ext.uint16 | None = ...,
379
+ bg_itable_unused_hi: _c_ext.uint16 | None = ...,
380
+ bg_exclude_bitmap_hi: _c_ext.uint32 | None = ...,
381
+ bg_block_bitmap_csum_hi: _c_ext.uint16 | None = ...,
382
+ bg_inode_bitmap_csum_hi: _c_ext.uint16 | None = ...,
383
+ bg_reserved: _c_ext.uint32 | None = ...,
384
+ ): ...
385
+ @overload
386
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
387
+
388
+ class ext4_inode(__cs__.Structure):
389
+ i_mode: _c_ext.uint16
390
+ i_uid: _c_ext.uint16
391
+ i_size_lo: _c_ext.uint32
392
+ i_atime: _c_ext.uint32
393
+ i_ctime: _c_ext.uint32
394
+ i_mtime: _c_ext.uint32
395
+ i_dtime: _c_ext.uint32
396
+ i_gid: _c_ext.uint16
397
+ i_links_count: _c_ext.uint16
398
+ i_blocks_lo: _c_ext.uint32
399
+ i_flags: _c_ext.uint32
400
+ i_reserved_1: _c_ext.uint32
401
+ i_block: __cs__.CharArray
402
+ i_generation: _c_ext.uint32
403
+ i_file_acl_lo: _c_ext.uint32
404
+ i_size_high: _c_ext.uint32
405
+ i_obso_faddr: _c_ext.uint32
406
+ i_blocks_high: _c_ext.uint16
407
+ i_file_acl_high: _c_ext.uint16
408
+ i_uid_high: _c_ext.uint16
409
+ i_gid_high: _c_ext.uint16
410
+ i_checksum_lo: _c_ext.uint16
411
+ i_reserved: _c_ext.uint16
412
+ i_extra_isize: _c_ext.uint16
413
+ i_checksum_hi: _c_ext.uint16
414
+ i_ctime_extra: _c_ext.uint32
415
+ i_mtime_extra: _c_ext.uint32
416
+ i_atime_extra: _c_ext.uint32
417
+ i_crtime: _c_ext.uint32
418
+ i_crtime_extra: _c_ext.uint32
419
+ i_version_hi: _c_ext.uint32
420
+ i_projid: _c_ext.uint32
421
+ i_extra: __cs__.CharArray
422
+ @overload
423
+ def __init__(
424
+ self,
425
+ /,
426
+ i_mode: _c_ext.uint16 | None = ...,
427
+ i_uid: _c_ext.uint16 | None = ...,
428
+ i_size_lo: _c_ext.uint32 | None = ...,
429
+ i_atime: _c_ext.uint32 | None = ...,
430
+ i_ctime: _c_ext.uint32 | None = ...,
431
+ i_mtime: _c_ext.uint32 | None = ...,
432
+ i_dtime: _c_ext.uint32 | None = ...,
433
+ i_gid: _c_ext.uint16 | None = ...,
434
+ i_links_count: _c_ext.uint16 | None = ...,
435
+ i_blocks_lo: _c_ext.uint32 | None = ...,
436
+ i_flags: _c_ext.uint32 | None = ...,
437
+ i_reserved_1: _c_ext.uint32 | None = ...,
438
+ i_block: __cs__.CharArray | None = ...,
439
+ i_generation: _c_ext.uint32 | None = ...,
440
+ i_file_acl_lo: _c_ext.uint32 | None = ...,
441
+ i_size_high: _c_ext.uint32 | None = ...,
442
+ i_obso_faddr: _c_ext.uint32 | None = ...,
443
+ i_blocks_high: _c_ext.uint16 | None = ...,
444
+ i_file_acl_high: _c_ext.uint16 | None = ...,
445
+ i_uid_high: _c_ext.uint16 | None = ...,
446
+ i_gid_high: _c_ext.uint16 | None = ...,
447
+ i_checksum_lo: _c_ext.uint16 | None = ...,
448
+ i_reserved: _c_ext.uint16 | None = ...,
449
+ i_extra_isize: _c_ext.uint16 | None = ...,
450
+ i_checksum_hi: _c_ext.uint16 | None = ...,
451
+ i_ctime_extra: _c_ext.uint32 | None = ...,
452
+ i_mtime_extra: _c_ext.uint32 | None = ...,
453
+ i_atime_extra: _c_ext.uint32 | None = ...,
454
+ i_crtime: _c_ext.uint32 | None = ...,
455
+ i_crtime_extra: _c_ext.uint32 | None = ...,
456
+ i_version_hi: _c_ext.uint32 | None = ...,
457
+ i_projid: _c_ext.uint32 | None = ...,
458
+ i_extra: __cs__.CharArray | None = ...,
459
+ ): ...
460
+ @overload
461
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
462
+
463
+ class ext2_dir_entry(__cs__.Structure):
464
+ inode: _c_ext.uint32
465
+ rec_len: _c_ext.uint16
466
+ name_len: _c_ext.uint16
467
+ name: __cs__.CharArray
468
+ @overload
469
+ def __init__(
470
+ self,
471
+ /,
472
+ inode: _c_ext.uint32 | None = ...,
473
+ rec_len: _c_ext.uint16 | None = ...,
474
+ name_len: _c_ext.uint16 | None = ...,
475
+ name: __cs__.CharArray | None = ...,
476
+ ): ...
477
+ @overload
478
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
479
+
480
+ class ext2_dir_entry_2(__cs__.Structure):
481
+ inode: _c_ext.uint32
482
+ rec_len: _c_ext.uint16
483
+ name_len: _c_ext.uint8
484
+ file_type: _c_ext.uint8
485
+ name: __cs__.CharArray
486
+ @overload
487
+ def __init__(
488
+ self,
489
+ /,
490
+ inode: _c_ext.uint32 | None = ...,
491
+ rec_len: _c_ext.uint16 | None = ...,
492
+ name_len: _c_ext.uint8 | None = ...,
493
+ file_type: _c_ext.uint8 | None = ...,
494
+ name: __cs__.CharArray | None = ...,
495
+ ): ...
496
+ @overload
497
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
498
+
499
+ class ext4_dir_entry_tail(__cs__.Structure):
500
+ det_reserved_zero1: _c_ext.uint32
501
+ det_rec_len: _c_ext.uint16
502
+ det_reserved_zero2: _c_ext.uint8
503
+ det_reserved_ft: _c_ext.uint8
504
+ det_checksum: _c_ext.uint32
505
+ @overload
506
+ def __init__(
507
+ self,
508
+ /,
509
+ det_reserved_zero1: _c_ext.uint32 | None = ...,
510
+ det_rec_len: _c_ext.uint16 | None = ...,
511
+ det_reserved_zero2: _c_ext.uint8 | None = ...,
512
+ det_reserved_ft: _c_ext.uint8 | None = ...,
513
+ det_checksum: _c_ext.uint32 | None = ...,
514
+ ): ...
515
+ @overload
516
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
517
+
518
+ class dx_root(__cs__.Structure):
519
+ dot: _c_ext.ext2_dir_entry_2
520
+ _pad0: __cs__.CharArray
521
+ dotdot: _c_ext.ext2_dir_entry_2
522
+ _pad1: __cs__.CharArray
523
+ reserved_zero: _c_ext.uint32
524
+ hash_version: _c_ext.uint8
525
+ info_length: _c_ext.uint8
526
+ indirect_levels: _c_ext.uint8
527
+ unused_flags: _c_ext.uint8
528
+ limit: _c_ext.uint16
529
+ count: _c_ext.uint16
530
+ block: _c_ext.uint32
531
+ @overload
532
+ def __init__(
533
+ self,
534
+ /,
535
+ dot: _c_ext.ext2_dir_entry_2 | None = ...,
536
+ _pad0: __cs__.CharArray | None = ...,
537
+ dotdot: _c_ext.ext2_dir_entry_2 | None = ...,
538
+ _pad1: __cs__.CharArray | None = ...,
539
+ reserved_zero: _c_ext.uint32 | None = ...,
540
+ hash_version: _c_ext.uint8 | None = ...,
541
+ info_length: _c_ext.uint8 | None = ...,
542
+ indirect_levels: _c_ext.uint8 | None = ...,
543
+ unused_flags: _c_ext.uint8 | None = ...,
544
+ limit: _c_ext.uint16 | None = ...,
545
+ count: _c_ext.uint16 | None = ...,
546
+ block: _c_ext.uint32 | None = ...,
547
+ ): ...
548
+ @overload
549
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
550
+
551
+ class dx_node(__cs__.Structure):
552
+ fake_direntry: _c_ext.ext2_dir_entry_2
553
+ limit: _c_ext.uint16
554
+ count: _c_ext.uint16
555
+ block: _c_ext.int32
556
+ @overload
557
+ def __init__(
558
+ self,
559
+ /,
560
+ fake_direntry: _c_ext.ext2_dir_entry_2 | None = ...,
561
+ limit: _c_ext.uint16 | None = ...,
562
+ count: _c_ext.uint16 | None = ...,
563
+ block: _c_ext.int32 | None = ...,
564
+ ): ...
565
+ @overload
566
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
567
+
568
+ class dx_entry(__cs__.Structure):
569
+ hash: _c_ext.uint32
570
+ block: _c_ext.uint32
571
+ @overload
572
+ def __init__(self, /, hash: _c_ext.uint32 | None = ..., block: _c_ext.uint32 | None = ...): ...
573
+ @overload
574
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
575
+
576
+ class ext4_extent_header(__cs__.Structure):
577
+ eh_magic: _c_ext.uint16
578
+ eh_entries: _c_ext.uint16
579
+ eh_max: _c_ext.uint16
580
+ eh_depth: _c_ext.uint16
581
+ eh_generation: _c_ext.uint32
582
+ @overload
583
+ def __init__(
584
+ self,
585
+ /,
586
+ eh_magic: _c_ext.uint16 | None = ...,
587
+ eh_entries: _c_ext.uint16 | None = ...,
588
+ eh_max: _c_ext.uint16 | None = ...,
589
+ eh_depth: _c_ext.uint16 | None = ...,
590
+ eh_generation: _c_ext.uint32 | None = ...,
591
+ ): ...
592
+ @overload
593
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
594
+
595
+ class ext4_extent_idx(__cs__.Structure):
596
+ ei_block: _c_ext.uint32
597
+ ei_leaf_lo: _c_ext.uint32
598
+ ei_leaf_hi: _c_ext.uint16
599
+ ei_unused: _c_ext.uint16
600
+ @overload
601
+ def __init__(
602
+ self,
603
+ /,
604
+ ei_block: _c_ext.uint32 | None = ...,
605
+ ei_leaf_lo: _c_ext.uint32 | None = ...,
606
+ ei_leaf_hi: _c_ext.uint16 | None = ...,
607
+ ei_unused: _c_ext.uint16 | None = ...,
608
+ ): ...
609
+ @overload
610
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
611
+
612
+ class ext4_extent(__cs__.Structure):
613
+ ee_block: _c_ext.uint32
614
+ ee_len: _c_ext.uint16
615
+ ee_start_hi: _c_ext.uint16
616
+ ee_start_lo: _c_ext.uint32
617
+ @overload
618
+ def __init__(
619
+ self,
620
+ /,
621
+ ee_block: _c_ext.uint32 | None = ...,
622
+ ee_len: _c_ext.uint16 | None = ...,
623
+ ee_start_hi: _c_ext.uint16 | None = ...,
624
+ ee_start_lo: _c_ext.uint32 | None = ...,
625
+ ): ...
626
+ @overload
627
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
628
+
629
+ class ext4_xattr_header(__cs__.Structure):
630
+ h_magic: _c_ext.uint32
631
+ h_refcount: _c_ext.uint32
632
+ h_blocks: _c_ext.uint32
633
+ h_hash: _c_ext.uint32
634
+ h_checksum: _c_ext.uint32
635
+ h_reserved: __cs__.Array[_c_ext.uint32]
636
+ @overload
637
+ def __init__(
638
+ self,
639
+ /,
640
+ h_magic: _c_ext.uint32 | None = ...,
641
+ h_refcount: _c_ext.uint32 | None = ...,
642
+ h_blocks: _c_ext.uint32 | None = ...,
643
+ h_hash: _c_ext.uint32 | None = ...,
644
+ h_checksum: _c_ext.uint32 | None = ...,
645
+ h_reserved: __cs__.Array[_c_ext.uint32] | None = ...,
646
+ ): ...
647
+ @overload
648
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
649
+
650
+ class ext4_xattr_ibody_header(__cs__.Structure):
651
+ h_magic: _c_ext.uint32
652
+ @overload
653
+ def __init__(self, /, h_magic: _c_ext.uint32 | None = ...): ...
654
+ @overload
655
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
656
+
657
+ class ext4_xattr_entry(__cs__.Structure):
658
+ e_name_len: _c_ext.uint8
659
+ e_name_index: _c_ext.uint8
660
+ e_value_offs: _c_ext.uint16
661
+ e_value_inum: _c_ext.uint32
662
+ e_value_size: _c_ext.uint32
663
+ e_hash: _c_ext.uint32
664
+ e_name: __cs__.CharArray
665
+ @overload
666
+ def __init__(
667
+ self,
668
+ /,
669
+ e_name_len: _c_ext.uint8 | None = ...,
670
+ e_name_index: _c_ext.uint8 | None = ...,
671
+ e_value_offs: _c_ext.uint16 | None = ...,
672
+ e_value_inum: _c_ext.uint32 | None = ...,
673
+ e_value_size: _c_ext.uint32 | None = ...,
674
+ e_hash: _c_ext.uint32 | None = ...,
675
+ e_name: __cs__.CharArray | None = ...,
676
+ ): ...
677
+ @overload
678
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
679
+
680
+ # Technically `c_ext` is an instance of `_c_ext`, but then we can't use it in type hints
681
+ c_ext: TypeAlias = _c_ext
@@ -0,0 +1,154 @@
1
+ # Generated by cstruct-stubgen
2
+ from typing import BinaryIO, Literal, TypeAlias, overload
3
+
4
+ import dissect.cstruct as __cs__
5
+
6
+ class _c_jdb2(__cs__.cstruct):
7
+ JBD2_MAGIC_NUMBER: Literal[3225106840] = ...
8
+ JBD2_DESCRIPTOR_BLOCK: Literal[1] = ...
9
+ JBD2_COMMIT_BLOCK: Literal[2] = ...
10
+ JBD2_SUPERBLOCK_V1: Literal[3] = ...
11
+ JBD2_SUPERBLOCK_V2: Literal[4] = ...
12
+ JBD2_REVOKE_BLOCK: Literal[5] = ...
13
+ JBD2_CRC32_CHKSUM: Literal[1] = ...
14
+ JBD2_MD5_CHKSUM: Literal[2] = ...
15
+ JBD2_SHA1_CHKSUM: Literal[3] = ...
16
+ JBD2_CRC32C_CHKSUM: Literal[4] = ...
17
+ JBD2_CRC32_CHKSUM_SIZE: Literal[4] = ...
18
+ JBD2_FLAG_ESCAPE: Literal[1] = ...
19
+ JBD2_FLAG_SAME_UUID: Literal[2] = ...
20
+ JBD2_FLAG_DELETED: Literal[4] = ...
21
+ JBD2_FLAG_LAST_TAG: Literal[8] = ...
22
+ JBD2_FEATURE_COMPAT_CHECKSUM: Literal[1] = ...
23
+ JBD2_FEATURE_INCOMPAT_REVOKE: Literal[1] = ...
24
+ JBD2_FEATURE_INCOMPAT_64BIT: Literal[2] = ...
25
+ JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT: Literal[4] = ...
26
+ JBD2_FEATURE_INCOMPAT_CSUM_V2: Literal[8] = ...
27
+ JBD2_FEATURE_INCOMPAT_CSUM_V3: Literal[16] = ...
28
+ class journal_header(__cs__.Structure):
29
+ h_magic: _c_jdb2.uint32
30
+ h_blocktype: _c_jdb2.uint32
31
+ h_sequence: _c_jdb2.uint32
32
+ @overload
33
+ def __init__(
34
+ self,
35
+ /,
36
+ h_magic: _c_jdb2.uint32 | None = ...,
37
+ h_blocktype: _c_jdb2.uint32 | None = ...,
38
+ h_sequence: _c_jdb2.uint32 | None = ...,
39
+ ): ...
40
+ @overload
41
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
42
+
43
+ class journal_superblock(__cs__.Structure):
44
+ s_header: _c_jdb2.journal_header
45
+ s_blocksize: _c_jdb2.uint32
46
+ s_maxlen: _c_jdb2.uint32
47
+ s_first: _c_jdb2.uint32
48
+ s_sequence: _c_jdb2.uint32
49
+ s_start: _c_jdb2.uint32
50
+ s_errno: _c_jdb2.uint32
51
+ s_feature_compat: _c_jdb2.uint32
52
+ s_feature_incompat: _c_jdb2.uint32
53
+ s_feature_ro_compat: _c_jdb2.uint32
54
+ s_uuid: __cs__.CharArray
55
+ s_nr_users: _c_jdb2.uint32
56
+ s_dynsuper: _c_jdb2.uint32
57
+ s_max_transaction: _c_jdb2.uint32
58
+ s_max_trans_data: _c_jdb2.uint32
59
+ s_checksum_type: _c_jdb2.uint8
60
+ s_padding2: __cs__.CharArray
61
+ s_padding: __cs__.CharArray
62
+ s_checksum: _c_jdb2.uint32
63
+ s_users: __cs__.Array[_c_jdb2.uint8]
64
+ @overload
65
+ def __init__(
66
+ self,
67
+ /,
68
+ s_header: _c_jdb2.journal_header | None = ...,
69
+ s_blocksize: _c_jdb2.uint32 | None = ...,
70
+ s_maxlen: _c_jdb2.uint32 | None = ...,
71
+ s_first: _c_jdb2.uint32 | None = ...,
72
+ s_sequence: _c_jdb2.uint32 | None = ...,
73
+ s_start: _c_jdb2.uint32 | None = ...,
74
+ s_errno: _c_jdb2.uint32 | None = ...,
75
+ s_feature_compat: _c_jdb2.uint32 | None = ...,
76
+ s_feature_incompat: _c_jdb2.uint32 | None = ...,
77
+ s_feature_ro_compat: _c_jdb2.uint32 | None = ...,
78
+ s_uuid: __cs__.CharArray | None = ...,
79
+ s_nr_users: _c_jdb2.uint32 | None = ...,
80
+ s_dynsuper: _c_jdb2.uint32 | None = ...,
81
+ s_max_transaction: _c_jdb2.uint32 | None = ...,
82
+ s_max_trans_data: _c_jdb2.uint32 | None = ...,
83
+ s_checksum_type: _c_jdb2.uint8 | None = ...,
84
+ s_padding2: __cs__.CharArray | None = ...,
85
+ s_padding: __cs__.CharArray | None = ...,
86
+ s_checksum: _c_jdb2.uint32 | None = ...,
87
+ s_users: __cs__.Array[_c_jdb2.uint8] | None = ...,
88
+ ): ...
89
+ @overload
90
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
91
+
92
+ class commit_header(__cs__.Structure):
93
+ h_magic: _c_jdb2.uint32
94
+ h_blocktype: _c_jdb2.uint32
95
+ h_sequence: _c_jdb2.uint32
96
+ h_chksum_type: _c_jdb2.uint8
97
+ h_chksum_size: _c_jdb2.uint8
98
+ h_padding: __cs__.CharArray
99
+ h_chksum: __cs__.CharArray
100
+ h_commit_sec: _c_jdb2.uint64
101
+ h_commit_nsec: _c_jdb2.uint32
102
+ @overload
103
+ def __init__(
104
+ self,
105
+ /,
106
+ h_magic: _c_jdb2.uint32 | None = ...,
107
+ h_blocktype: _c_jdb2.uint32 | None = ...,
108
+ h_sequence: _c_jdb2.uint32 | None = ...,
109
+ h_chksum_type: _c_jdb2.uint8 | None = ...,
110
+ h_chksum_size: _c_jdb2.uint8 | None = ...,
111
+ h_padding: __cs__.CharArray | None = ...,
112
+ h_chksum: __cs__.CharArray | None = ...,
113
+ h_commit_sec: _c_jdb2.uint64 | None = ...,
114
+ h_commit_nsec: _c_jdb2.uint32 | None = ...,
115
+ ): ...
116
+ @overload
117
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
118
+
119
+ class journal_block_tag(__cs__.Structure):
120
+ t_blocknr: _c_jdb2.uint32
121
+ t_checksum: _c_jdb2.uint16
122
+ t_flags: _c_jdb2.uint16
123
+ t_blocknr_high: _c_jdb2.uint32
124
+ @overload
125
+ def __init__(
126
+ self,
127
+ /,
128
+ t_blocknr: _c_jdb2.uint32 | None = ...,
129
+ t_checksum: _c_jdb2.uint16 | None = ...,
130
+ t_flags: _c_jdb2.uint16 | None = ...,
131
+ t_blocknr_high: _c_jdb2.uint32 | None = ...,
132
+ ): ...
133
+ @overload
134
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
135
+
136
+ class journal_block_tag3(__cs__.Structure):
137
+ t_blocknr: _c_jdb2.uint32
138
+ t_flags: _c_jdb2.uint32
139
+ t_blocknr_high: _c_jdb2.uint32
140
+ t_checksum: _c_jdb2.uint32
141
+ @overload
142
+ def __init__(
143
+ self,
144
+ /,
145
+ t_blocknr: _c_jdb2.uint32 | None = ...,
146
+ t_flags: _c_jdb2.uint32 | None = ...,
147
+ t_blocknr_high: _c_jdb2.uint32 | None = ...,
148
+ t_checksum: _c_jdb2.uint32 | None = ...,
149
+ ): ...
150
+ @overload
151
+ def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...
152
+
153
+ # Technically `c_jdb2` is an instance of `_c_jdb2`, but then we can't use it in type hints
154
+ c_jdb2: TypeAlias = _c_jdb2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dissect.extfs
3
- Version: 3.16.dev2
3
+ Version: 3.16.dev3
4
4
  Summary: A Dissect module implementing a parser for the ExtFS file system, the native filesystem for Linux operating systems
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,>=4
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<5.0.dev,>=4.0.dev; extra == "dev"
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,10 +10,14 @@ dissect.extfs.egg-info/PKG-INFO
10
10
  dissect.extfs.egg-info/SOURCES.txt
11
11
  dissect.extfs.egg-info/dependency_links.txt
12
12
  dissect.extfs.egg-info/requires.txt
13
+ dissect.extfs.egg-info/scm_file_list.json
14
+ dissect.extfs.egg-info/scm_version.json
13
15
  dissect.extfs.egg-info/top_level.txt
14
16
  dissect/extfs/__init__.py
15
17
  dissect/extfs/c_ext.py
18
+ dissect/extfs/c_ext.pyi
16
19
  dissect/extfs/c_jdb2.py
20
+ dissect/extfs/c_jdb2.pyi
17
21
  dissect/extfs/exceptions.py
18
22
  dissect/extfs/extfs.py
19
23
  dissect/extfs/journal.py
@@ -0,0 +1,6 @@
1
+ dissect.cstruct<6,>=5.0.dev
2
+ dissect.util<4,>=3
3
+
4
+ [dev]
5
+ dissect.cstruct<6.0.dev,>=5.0.dev
6
+ dissect.util<4.0.dev,>=3.0.dev
@@ -0,0 +1,33 @@
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/extfs/__init__.py",
13
+ "dissect/extfs/c_ext.py",
14
+ "dissect/extfs/c_ext.pyi",
15
+ "dissect/extfs/c_jdb2.py",
16
+ "dissect/extfs/c_jdb2.pyi",
17
+ "dissect/extfs/exceptions.py",
18
+ "dissect/extfs/extfs.py",
19
+ "dissect/extfs/journal.py",
20
+ "pyproject.toml",
21
+ "tests/__init__.py",
22
+ "tests/_docs/Makefile",
23
+ "tests/_docs/conf.py",
24
+ "tests/_docs/index.rst",
25
+ "tests/conftest.py",
26
+ "tests/data/ext4.bin.gz",
27
+ "tests/data/ext4_sparse.bin.gz",
28
+ "tests/data/ext4_symlink_test.bin.gz",
29
+ "tests/test_exceptions.py",
30
+ "tests/test_ext4.py",
31
+ "tox.ini"
32
+ ]
33
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "3.15",
3
+ "distance": 3,
4
+ "node": "g8f5f90a6f548252b3067efcd57848dac072edc11",
5
+ "dirty": true,
6
+ "branch": "main",
7
+ "node_date": "2026-12-02"
8
+ }
@@ -25,7 +25,7 @@ classifiers = [
25
25
  "Topic :: Utilities",
26
26
  ]
27
27
  dependencies = [
28
- "dissect.cstruct>=4,<5",
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.extfs"
37
37
 
38
38
  [project.optional-dependencies]
39
39
  dev = [
40
- "dissect.cstruct>=4.0.dev,<5.0.dev",
40
+ "dissect.cstruct>=5.0.dev,<6.0.dev",
41
41
  "dissect.util>=3.0.dev,<4.0.dev",
42
42
  ]
43
43
 
@@ -124,6 +124,7 @@ strict = true
124
124
 
125
125
  [tool.ruff.lint.per-file-ignores]
126
126
  "tests/_docs/**" = ["INP001"]
127
+ "**/*.pyi" = ["PYI042", "PYI047"]
127
128
 
128
129
  [tool.ruff.lint.isort]
129
130
  known-first-party = ["dissect.extfs"]
@@ -1,6 +0,0 @@
1
- dissect.cstruct<5,>=4
2
- dissect.util<4,>=3
3
-
4
- [dev]
5
- dissect.cstruct<5.0.dev,>=4.0.dev
6
- dissect.util<4.0.dev,>=3.0.dev