在检查 TSK API 时,我发现了一个函数,它返回文件系统的每个块/扇区的大小。我使用 pytsk3 在 Python 中进行了尝试。
import pytsk3
#defining the path of the disk image
url="10-ntfs-disk.dd"
#getting an Img_Info object
img=pytsk3.Img_Info(url)
#opening the file system, 32256 is the offset of the file system in bytes
fs=pytsk3.TSK_FS_INFO(img, 32256, pytsk3.TSK_FS_TYPE_NTFS)
print fs.block_size
但是,输出是“分段错误”。我不确定接下来我应该做什么。在 pytsk3 的GitHub wiki 上,该示例用于pytsk3.FS_Info()
打开文件系统,尽管该类似乎没有返回块大小的函数。