diff --git a/xanalyzer/file.py b/xanalyzer/file.py index bf77dbd..f5af668 100644 --- a/xanalyzer/file.py +++ b/xanalyzer/file.py @@ -1,3 +1,4 @@ +import io import os import re import json @@ -34,7 +35,8 @@ def guess_type_and_ext(self, the_content): the_file_type = magic.from_buffer(the_content) the_ext = [] if the_file_type.startswith("Zip archive data"): - the_zip = ZipFile(self.file_path) + the_file = io.BytesIO(the_content) + the_zip = ZipFile(the_file) zip_namelist = the_zip.namelist() the_zip.close() if "AndroidManifest.xml" in zip_namelist: