dissect.squashfs.squashfs
¶
Module Contents¶
Classes¶
Create a stream from multiple runs on another file-like object. |
- class dissect.squashfs.squashfs.SquashFS(fh: BinaryIO)¶
- class dissect.squashfs.squashfs.INode(fs: SquashFS, block: int, offset: int, name: str | None = None, type: int | None = None, inode_number: int | None = None, parent: INode | None = None)¶
- property inode_number: int¶
- property type: int¶
- property mode: int¶
- property uid: int¶
- property guid: int¶
- property gid: int¶
- property mtime: datetime.datetime¶
- property size: int | None¶
- __repr__() str ¶
Return repr(self).
- header() dissect.cstruct.Instance ¶
- data_block() int ¶
- data_offset() int ¶
- is_dir() bool ¶
- is_file() bool ¶
- is_symlink() bool ¶
- is_block_device() bool ¶
- is_character_device() bool ¶
- is_device() bool ¶
- is_fifo() bool ¶
- is_socket() bool ¶
- is_ipc() bool ¶
- link() str ¶
- block_list() list[tuple[int | None, int]] ¶
- open() FileStream ¶
- class dissect.squashfs.squashfs.FileStream(inode: INode)¶
Bases:
dissect.util.stream.RunlistStream
Create a stream from multiple runs on another file-like object.
This is common in filesystems, where file data information is stored in “runs”. A run is a
(block_offset, block_count)
tuple, meaning the amount of consecutive blocks from a specific starting block. A block_offset ofNone
represents a sparse run, meaning it must simply return all\x00
bytes.- Parameters:
fh – The source file-like object.
runlist – The runlist for this stream in block units.
size – The size of the stream. This can be smaller than the total sum of blocks (to account for slack space).
block_size – The block size in bytes.
align – Optional alignment that differs from the block size, otherwise
block_size
is used as alignment.