From ca2485db4ee214afc9edb4a199ba8ace51d2bb7c Mon Sep 17 00:00:00 2001 From: Jurriaan Bremer Date: Fri, 19 May 2017 14:28:27 +0200 Subject: [PATCH] enlarge buffer size when writing file-like object --- cuckoo/common/files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cuckoo/common/files.py b/cuckoo/common/files.py index 9a23e846d0..283d7a4cca 100644 --- a/cuckoo/common/files.py +++ b/cuckoo/common/files.py @@ -149,10 +149,10 @@ def create(root, filename, content): filepath = os.path.join(root, filename) with open(filepath, "wb") as f: if hasattr(content, "read"): - chunk = content.read(1024) + chunk = content.read(1024 * 1024) while chunk: f.write(chunk) - chunk = content.read(1024) + chunk = content.read(1024 * 1024) else: f.write(content) return filepath