From 35f678245fc5cd53a26d7a2d8d7e23a5780bada1 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Fri, 30 Jun 2023 16:22:30 +0200 Subject: [PATCH] fix: [decoded] fix download file --- bin/lib/objects/Decodeds.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/lib/objects/Decodeds.py b/bin/lib/objects/Decodeds.py index 001f7dfd..fb194be1 100755 --- a/bin/lib/objects/Decodeds.py +++ b/bin/lib/objects/Decodeds.py @@ -138,7 +138,7 @@ class Decoded(AbstractDaterangeObject): with open(filepath, 'rb') as f: content = f.read() return content - elif r_str == 'bytesio': + elif r_type == 'bytesio': with open(filepath, 'rb') as f: content = BytesIO(f.read()) return content @@ -149,7 +149,7 @@ class Decoded(AbstractDaterangeObject): with zipfile.ZipFile(zip_content, "w") as zf: # TODO: Fix password # zf.setpassword(b"infected") - zf.writestr(self.id, self.get_content().getvalue()) + zf.writestr(self.id, self.get_content(r_type='bytesio').getvalue()) zip_content.seek(0) return zip_content