diff --git a/unblob/handlers/archive/zip.py b/unblob/handlers/archive/zip.py index d6485f919e..b1e670051c 100644 --- a/unblob/handlers/archive/zip.py +++ b/unblob/handlers/archive/zip.py @@ -1,12 +1,12 @@ import io import zipfile +from typing import List, Union from dissect.cstruct import cstruct from structlog import get_logger -from typing import List, Set, Tuple, Union -from ...models import ValidChunk, UnknownChunk from ...file_utils import find_first +from ...models import UnknownChunk, ValidChunk logger = get_logger() @@ -113,7 +113,7 @@ def _calculate_zipfile_end(file: io.BufferedReader, start_offset: int) -> int: # In our case, we want to find the first instance of the EOCD record header, not the last! zip_end = find_first(file, b"\x50\x4b\x05\x06") + start_offset file.seek(zip_end) - eocd = cparser.end_of_central_directory(file) + _ = cparser.end_of_central_directory(file) return file.tell() @@ -148,7 +148,7 @@ def calculate_chunk( return UnknownChunk( start_offset=start_offset, end_offset=end_of_zip, - reason=f"ZIP contains encrypted files.", + reason="ZIP contains encrypted files.", ) return ValidChunk(