acquire.acquire.outputs.zip

Module Contents

Classes

ZipOutput

Zip archive acquire output format. Output can be compressed and/or encrypted.

class acquire.acquire.outputs.zip.ZipOutput(path: pathlib.Path, compress: bool = False, encrypt: bool = False, public_key: bytes | None = None)

Bases: acquire.outputs.base.Output

Zip archive acquire output format. Output can be compressed and/or encrypted.

Parameters:
  • path – The path to write the zip archive to.

  • compress – Whether to compress the zip archive.

  • encrypt – Whether to encrypt the zip archive.

  • public_key – The RSA public key to encrypt the header with.

write(output_path: str, fh: BinaryIO, entry: dissect.target.filesystem.FilesystemEntry | pathlib.Path | None = None, size: int | None = None) None

Write a filesystem entry or file-like object to a zip file.

Parameters:
  • output_path – The path of the entry in the output format.

  • fh – The file-like object of the entry to write.

  • entry – The optional filesystem entry of the entry to write.

  • size – The optional file size in bytes of the entry to write.

close() None

Closes the archive file.