acquire.acquire.outputs.zip
¶
Module Contents¶
Classes¶
Zip archive acquire output format. Output can be compressed and/or encrypted. |
Attributes¶
- acquire.acquire.outputs.zip.ZIP_COMPRESSION_METHODS¶
- class acquire.acquire.outputs.zip.ZipOutput(path: pathlib.Path, compress: bool = False, compression_method: str = 'deflate', 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.
compression_method – Compression method to use (Default: Deflate). Supports “deflate”, “bzip2”, “lzma”.
encrypt – Whether to encrypt the zip archive.
public_key – The RSA public key to encrypt the header with.
- path¶
- 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.