: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:attribute:: fh .. py:attribute:: inode .. py:attribute:: root .. py:method:: get(path: str | int, node: INode | None = None) -> INode .. py:class:: DirEntry(fs: JFFS2, entry: dissect.jffs.c_jffs2.c_jffs2.jffs2_raw_dirent) .. py:attribute:: fs .. py:attribute:: entry .. py:attribute:: parent_inum .. py:attribute:: version .. py:attribute:: inum .. py:attribute:: type .. py:property:: name :type: str .. py:class:: INode(fs: JFFS2, inum: int, type: int | None = None, parent: INode | None = None) .. py:attribute:: fs .. py:attribute:: inum .. py:attribute:: parent :value: None .. py:attribute:: listdir .. py:method:: __repr__() -> str .. py:property:: inodes :type: list[tuple[dissect.jffs.c_jffs2.c_jffs2.jffs2_raw_inode, int]] .. py:property:: inode :type: dissect.jffs.c_jffs2.c_jffs2.jffs2_raw_inode .. py:property:: size :type: int .. py:property:: mode :type: int .. py:property:: type :type: int .. py:property:: atime :type: datetime.datetime .. py:property:: mtime :type: datetime.datetime .. py:property:: ctime :type: datetime.datetime .. py:property:: uid :type: int .. py:property:: gid :type: int .. py:property:: nlink :type: int .. py:method:: is_dir() -> bool .. py:method:: is_file() -> bool .. py:method:: is_symlink() -> bool .. py:property:: link :type: str .. py:property:: link_inode :type: INode .. py:method:: iterdir() -> collections.abc.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. .. py:attribute:: fs .. py:attribute:: inum