:py:mod:`dissect.jffs.jffs2` ============================ .. py:module:: dissect.jffs.jffs2 Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.jffs.jffs2.JFFS2 dissect.jffs.jffs2.DirEntry dissect.jffs.jffs2.INode dissect.jffs.jffs2.DataStream Attributes ~~~~~~~~~~ .. autoapisummary:: dissect.jffs.jffs2.log .. py:data:: log .. py:class:: JFFS2(fh: BinaryIO) Journalling Flash File System, version 2 implementation. Currently supports the most common compression formats (``zlib``, ``lzo``, ``none`` and ``zero``). CRC checksums are currently ignored. Compression formats ``rtime``, ``rubinmips``, ``copy`` and ``dynrubin`` are not supported. .. rubric:: References - https://sourceware.org/jffs2/ - https://github.com/torvalds/linux/blob/master/fs/jffs2/readinode.c .. py:method:: inode(inum: int, type: Optional[int] = None, parent: Optional[INode] = None) -> INode .. py:method:: get(path: Union[str, int], node: Optional[INode] = None) -> INode .. py:class:: DirEntry(fs: JFFS2, entry: dissect.jffs.c_jffs2.c_jffs2.jffs2_raw_dirent) .. py:method:: name() -> str .. py:class:: INode(fs: JFFS2, inum: int, type: Optional[int] = None, parent: Optional[INode] = None) .. py:method:: __repr__() -> str Return repr(self). .. py:method:: inodes() -> list[tuple[dissect.jffs.c_jffs2.c_jffs2.jffs2_raw_inode, int]] .. py:method:: inode() -> dissect.jffs.c_jffs2.c_jffs2.jffs2_raw_inode .. py:method:: size() -> int .. py:method:: mode() -> int .. py:method:: type() -> int .. py:method:: atime() -> datetime.datetime .. py:method:: mtime() -> datetime.datetime .. py:method:: ctime() -> datetime.datetime .. py:method:: uid() -> int .. py:method:: gid() -> int .. py:method:: is_dir() -> bool .. py:method:: is_file() -> bool .. py:method:: is_symlink() -> bool .. py:method:: link() -> str .. py:method:: link_inode() .. py:method:: listdir() -> dict .. py:method:: iterdir() -> Iterator[tuple[str, INode]] .. py:method:: open() -> dissect.util.stream.RunlistStream Return data contained in all associated data inodes. Supports JFFS2_COMPR_NONE, JFFS2_COMPR_ZERO, JFFS2_COMPR_ZLIB and JFFS2_COMPR_LZO. Does not support JFFS2_COMPR_RTIME, JFFS2_COMPR_RUBINMIPS, JFFS2_COMPR_COPY and JFFS2_COMPR_DYNRUBIN. .. py:class:: DataStream(fs: JFFS2, inum: int, size: int) Bases: :py:obj:`dissect.util.stream.AlignedStream` JFFS2 buffered stream that provides easy aligned reads. To read file contents, the log inodes are played back in version order, to recreate a map of where each range of data is located on the physical medium.