Skip to content

Commit

Permalink
Rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
takeshi committed Nov 23, 2021
1 parent f4e05ce commit 9f7dce4
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions unblob/handlers/archive/zip.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import io
import zipfile

from dissect.cstruct import cstruct
from structlog import get_logger
Expand Down Expand Up @@ -116,21 +117,6 @@ def _calculate_zipfile_end(file: io.BufferedReader, start_offset: int) -> int:
return file.tell()


def _enumerate_files(file: io.BufferedReader, start_offset: int) -> Tuple[Set, Set]:
# TODO: When we
normal_files = set()
encrypted_files = set()

file.seek(start_offset)
with zipfile.ZipFile(file) as zip_file:
for zip_info in zip_file.infolist():
if zip_info.flag_bits & 0b0001:
encrypted_files.add(zip_info.filename)
normal_files.add(zip_info.filename)

return (normal_files, encrypted_files)


def calculate_chunk(
file: io.BufferedReader, start_offset: int
) -> Union[ValidChunk, UnknownChunk]:
Expand Down

0 comments on commit 9f7dce4

Please sign in to comment.