Merge pull request #21 from hp3icc/develop

Update security_downloader.py
develop
Esteban Mackay Q. 3 days ago committed by GitHub
commit 45ee7c3967
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -3,6 +3,7 @@ import os
import logging import logging
import urllib.request import urllib.request
import urllib.error import urllib.error
from urllib.parse import quote
import tempfile import tempfile
import shutil import shutil
import socket import socket
@ -49,7 +50,7 @@ def build_download_url(config, filename):
logger.error('(SECURITY) Could not resolve hostname: %s', url_security) logger.error('(SECURITY) Could not resolve hostname: %s', url_security)
return None, None return None, None
url = f"http://{host}:{port_security}/descargar?pass={pass_security}&file={filename}" url = f"http://{host}:{port_security}/descargar?pass={quote(pass_security, safe='')}&file={filename}"
return url, url_security return url, url_security
def download_file_safely(url, dest_path, timeout=60): def download_file_safely(url, dest_path, timeout=60):

Loading…
Cancel
Save

Powered by TurnKey Linux.