dissect.target.loaders.tar

Module Contents

Classes

TarSubLoader

Tar implementation of a SubLoader.

GenericTarSubLoader

Generic tar sub loader.

TarLoader

Load tar files.

Functions

Attributes

dissect.target.loaders.tar.log
dissect.target.loaders.tar.TAR_EXT_COMP = ('.tar.gz', '.tar.xz', '.tar.bz', '.tar.bz2', '.tar.lzma', '.tar.lz', '.tgz', '.txz', '.tbz',...
dissect.target.loaders.tar.TAR_EXT = ('.tar',)
dissect.target.loaders.tar.TAR_MAGIC_COMP = (b'\x1f\x8b', b'BZh', b'\xfd7zXZ\x00', b']\x00\x00\x01\x00', b']\x00\x00\x10\x00',...
dissect.target.loaders.tar.TAR_MAGIC
dissect.target.loaders.tar.WINDOWS_MEMBERS = ('windows/system32', '/windows/system32', 'winnt', '/winnt')
class dissect.target.loaders.tar.TarSubLoader(path: pathlib.Path, tar: tarfile.TarFile, **kwargs)

Bases: dissect.target.loader.SubLoader[tarfile.TarFile]

Tar implementation of a SubLoader.

tar
static detect(path: pathlib.Path, tarfile: tarfile.TarFile) bool
Abstractmethod:

Only to be called internally by TarLoader.

abstract map(target: TarSubLoader.map.target) None

Only to be called internally by TarLoader.

class dissect.target.loaders.tar.GenericTarSubLoader(path: pathlib.Path, tar: tarfile.TarFile, **kwargs)

Bases: TarSubLoader

Generic tar sub loader.

static detect(path: pathlib.Path, tarfile: tarfile.TarFile) bool

Only to be called internally by TarLoader.

map(target: GenericTarSubLoader.map.target) None

Only to be called internally by TarLoader.

class dissect.target.loaders.tar.TarLoader(path: pathlib.Path, **kwargs)

Bases: dissect.target.loader.Loader

Load tar files.

__subloaders__
fh
tar
subloader = None
static detect(path: pathlib.Path) bool

Detects wether this Loader class can load this specific path.

Parameters:

path – The target path to check.

Returns:

True if the path can be loaded by a Loader instance. False otherwise.

map(target: TarLoader.map.target) None

Maps the loaded path into a Target.

Parameters:

target – The target that we’re mapping into.

dissect.target.loaders.tar.is_tar_magic(path: pathlib.Path, magics: collections.abc.Iterable[bytes]) bool
dissect.target.loaders.tar.is_compressed(path: pathlib.Path) bool