Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions OpenAttack/utils/zip_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import zipfile
import os
from tqdm import tqdm

import ssl

def make_zip_downloader(URL : str, file_list=None, resource_name = None):
"""
Expand All @@ -28,7 +28,8 @@ def DOWNLOAD(path : str, source : str):
else:
name = resource_name

with urllib.request.urlopen(remote_url) as fin:
context = ssl._create_unverified_context()
with urllib.request.urlopen(remote_url, context=context) as fin:
CHUNK_SIZE = 4 * 1024
total_length = int(fin.headers["content-length"])
with open(path + ".zip", "wb") as ftmp:
Expand Down