dissect.target 3.20.dev23__py3-none-any.whl → 3.20.dev25__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dissect/target/filesystems/btrfs.py +4 -1
- dissect/target/filesystems/ntfs.py +18 -2
- {dissect.target-3.20.dev23.dist-info → dissect.target-3.20.dev25.dist-info}/METADATA +1 -1
- {dissect.target-3.20.dev23.dist-info → dissect.target-3.20.dev25.dist-info}/RECORD +9 -9
- {dissect.target-3.20.dev23.dist-info → dissect.target-3.20.dev25.dist-info}/COPYRIGHT +0 -0
- {dissect.target-3.20.dev23.dist-info → dissect.target-3.20.dev25.dist-info}/LICENSE +0 -0
- {dissect.target-3.20.dev23.dist-info → dissect.target-3.20.dev25.dist-info}/WHEEL +0 -0
- {dissect.target-3.20.dev23.dist-info → dissect.target-3.20.dev25.dist-info}/entry_points.txt +0 -0
- {dissect.target-3.20.dev23.dist-info → dissect.target-3.20.dev25.dist-info}/top_level.txt +0 -0
@@ -181,6 +181,9 @@ class BtrfsFilesystemEntry(FilesystemEntry):
|
|
181
181
|
|
182
182
|
# Add block information of the filesystem
|
183
183
|
st_info.st_blksize = entry.btrfs.sector_size
|
184
|
-
|
184
|
+
|
185
|
+
st_info.st_blocks = 0
|
186
|
+
if not self.is_dir():
|
187
|
+
st_info.st_blocks = (st_info.st_blksize // 512) * math.ceil(st_info.st_size / st_info.st_blksize)
|
185
188
|
|
186
189
|
return st_info
|
@@ -1,5 +1,6 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
+
import math
|
3
4
|
import stat
|
4
5
|
from typing import BinaryIO, Iterator, Optional
|
5
6
|
|
@@ -151,12 +152,14 @@ class NtfsFilesystemEntry(FilesystemEntry):
|
|
151
152
|
record = self.dereference()
|
152
153
|
|
153
154
|
size = 0
|
155
|
+
real_size = 0
|
154
156
|
if self.is_symlink():
|
155
157
|
mode = stat.S_IFLNK
|
156
158
|
elif self.is_file():
|
157
159
|
mode = stat.S_IFREG
|
158
160
|
try:
|
159
161
|
size = record.size(self.ads)
|
162
|
+
real_size = record.size(self.ads, allocated=True)
|
160
163
|
except NtfsFileNotFoundError as e:
|
161
164
|
# Occurs when it cannot find the the specific ads inside its attributes
|
162
165
|
raise FileNotFoundError from e
|
@@ -176,16 +179,29 @@ class NtfsFilesystemEntry(FilesystemEntry):
|
|
176
179
|
0,
|
177
180
|
size,
|
178
181
|
stdinfo.last_access_time.timestamp(),
|
179
|
-
stdinfo.
|
182
|
+
stdinfo.last_modification_time.timestamp(),
|
183
|
+
# ctime gets set to creation time for python <3.12 purposes
|
180
184
|
stdinfo.creation_time.timestamp(),
|
181
185
|
]
|
182
186
|
)
|
183
187
|
|
184
188
|
# Set the nanosecond resolution separately
|
185
189
|
st_info.st_atime_ns = stdinfo.last_access_time_ns
|
186
|
-
st_info.st_mtime_ns = stdinfo.
|
190
|
+
st_info.st_mtime_ns = stdinfo.last_modification_time_ns
|
191
|
+
|
187
192
|
st_info.st_ctime_ns = stdinfo.creation_time_ns
|
188
193
|
|
194
|
+
st_info.st_birthtime = stdinfo.creation_time.timestamp()
|
195
|
+
st_info.st_birthtime_ns = stdinfo.creation_time_ns
|
196
|
+
|
197
|
+
# real_size is none if the size is resident
|
198
|
+
st_info.st_blksize = record.ntfs.cluster_size
|
199
|
+
blocks = 0
|
200
|
+
if not record.resident:
|
201
|
+
blocks = math.ceil(real_size / 512)
|
202
|
+
|
203
|
+
st_info.st_blocks = blocks
|
204
|
+
|
189
205
|
return st_info
|
190
206
|
|
191
207
|
def attr(self) -> AttributeMap:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: dissect.target
|
3
|
-
Version: 3.20.
|
3
|
+
Version: 3.20.dev25
|
4
4
|
Summary: This module ties all other Dissect modules together, it provides a programming API and command line tools which allow easy access to various data sources inside disk images or file collections (a.k.a. targets)
|
5
5
|
Author-email: Dissect Team <dissect@fox-it.com>
|
6
6
|
License: Affero General Public License v3
|
@@ -23,7 +23,7 @@ dissect/target/containers/vmdk.py,sha256=5fQGkJy4esXONXrKLbhpkQDt8Fwx19YENK2mOm7
|
|
23
23
|
dissect/target/data/autocompletion/target_bash_completion.sh,sha256=wrOQ_ED-h8WFcjCmY6n4qKl84tWJv9l8ShFHDfJqJyA,3592
|
24
24
|
dissect/target/filesystems/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
25
|
dissect/target/filesystems/ad1.py,sha256=nEPzaaRsb6bL4ItFo0uLdmdLvrmK9BjqHeD3FOp3WQI,2413
|
26
|
-
dissect/target/filesystems/btrfs.py,sha256=
|
26
|
+
dissect/target/filesystems/btrfs.py,sha256=TotOs0-VOmgSijERZb1pOrIH_E7B1J_DRKqws8ttQTk,6569
|
27
27
|
dissect/target/filesystems/cb.py,sha256=6LcoJiwsYu1Han31IUzVpZVDTifhTLTx_gLfNpB_p6k,5329
|
28
28
|
dissect/target/filesystems/config.py,sha256=GQOtixIIt-Jjtpl3IVqUTujcBFfWaAZeAtvxgNUNetU,11963
|
29
29
|
dissect/target/filesystems/cpio.py,sha256=ssVCjkAtLn2FqmNxeo6U5boyUdSYFxLWfXpytHYGPqs,641
|
@@ -34,7 +34,7 @@ dissect/target/filesystems/fat.py,sha256=ZSw-wS57vo5eIXJndfI1rZkGu_qh-vyioMzCZFZ
|
|
34
34
|
dissect/target/filesystems/ffs.py,sha256=Wu8sS1jjmD0QXXcAaD2h_zzfvinjco8qvj0hErufZ-4,4555
|
35
35
|
dissect/target/filesystems/itunes.py,sha256=w2lcWv6jlBPm84tsGZehxKBMXXyuW3KlmwVTF4ssQec,6395
|
36
36
|
dissect/target/filesystems/jffs.py,sha256=Ceqa5Em2pepnXMH_XZFmSNjQyWPo1uWTthBFSMWfKRo,3926
|
37
|
-
dissect/target/filesystems/ntfs.py,sha256=
|
37
|
+
dissect/target/filesystems/ntfs.py,sha256=Losf35q9aLm-YdwVllT5so99s-GqTF1ZXMbLX0PUNC0,7624
|
38
38
|
dissect/target/filesystems/overlay.py,sha256=d0BNZcVd3SzBcM1SZO5nX2FrEYcdtVH34BPJQ6Oh4x8,4753
|
39
39
|
dissect/target/filesystems/smb.py,sha256=uxfcOWwEoDCw8Qpsa94T5Pn-SKd4WXs4OOrzVVI55d8,6406
|
40
40
|
dissect/target/filesystems/squashfs.py,sha256=ehzlThXB7n96XUvQnsK5tWLsA9HIxYN-Zxl7aO9D7ts,3921
|
@@ -368,10 +368,10 @@ dissect/target/volumes/luks.py,sha256=OmCMsw6rCUXG1_plnLVLTpsvE1n_6WtoRUGQbpmu1z
|
|
368
368
|
dissect/target/volumes/lvm.py,sha256=wwQVR9I3G9YzmY6UxFsH2Y4MXGBcKL9aayWGCDTiWMU,2269
|
369
369
|
dissect/target/volumes/md.py,sha256=7ShPtusuLGaIv27SvEETtgsuoQyAa4iAAeOR1NEaajI,1689
|
370
370
|
dissect/target/volumes/vmfs.py,sha256=-LoUbn9WNwTtLi_4K34uV_-wDw2W5hgaqxZNj4UmqAQ,1730
|
371
|
-
dissect.target-3.20.
|
372
|
-
dissect.target-3.20.
|
373
|
-
dissect.target-3.20.
|
374
|
-
dissect.target-3.20.
|
375
|
-
dissect.target-3.20.
|
376
|
-
dissect.target-3.20.
|
377
|
-
dissect.target-3.20.
|
371
|
+
dissect.target-3.20.dev25.dist-info/COPYRIGHT,sha256=m-9ih2RVhMiXHI2bf_oNSSgHgkeIvaYRVfKTwFbnJPA,301
|
372
|
+
dissect.target-3.20.dev25.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
373
|
+
dissect.target-3.20.dev25.dist-info/METADATA,sha256=jFh9-AJEF-Ngndjz8WcuWXQflbuRTJhlN2u3t1k8sAw,12897
|
374
|
+
dissect.target-3.20.dev25.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
375
|
+
dissect.target-3.20.dev25.dist-info/entry_points.txt,sha256=BWuxAb_6AvUAQpIQOQU0IMTlaF6TDht2AIZK8bHd-zE,492
|
376
|
+
dissect.target-3.20.dev25.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
|
377
|
+
dissect.target-3.20.dev25.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
{dissect.target-3.20.dev23.dist-info → dissect.target-3.20.dev25.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|