From 18b36f5692e131b5eab2792b9eda7233fbae98d7 Mon Sep 17 00:00:00 2001 From: Xpl0itU <24777100+Xpl0itU@users.noreply.github.com> Date: Wed, 19 Jul 2023 02:01:46 +0200 Subject: [PATCH] Disable HTTPS verification --- .github/workflows/windows.yml | 3 +-- grabTitles.py | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2706bfb..f2b2d81 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -16,10 +16,9 @@ jobs: msystem: UCRT64 release: true update: true - install: zip git mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-python mingw-w64-ucrt-x86_64-python-pip mingw-w64-ucrt-x86_64-gtk3 mingw-w64-ucrt-x86_64-go mingw-w64-ucrt-x86_64-ntldd-git + install: zip git mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-python mingw-w64-ucrt-x86_64-gtk3 mingw-w64-ucrt-x86_64-go mingw-w64-ucrt-x86_64-ntldd-git - name: Build run: | - python3 -m pip install pip-system-certs python3 grabTitles.py go build cmd/WiiUDownloader/*.go - name: Deploy WiiUDownloader diff --git a/grabTitles.py b/grabTitles.py index d565455..58e7958 100644 --- a/grabTitles.py +++ b/grabTitles.py @@ -2,6 +2,7 @@ import os import urllib.request +import ssl # Don't edit below this line @@ -10,7 +11,12 @@ def checkAndDeleteFile(file): print(f"Deleting {file}") os.remove(file) -opener = urllib.request.build_opener() +# Disable certificate verification +ssl_context = ssl.create_default_context() +ssl_context.check_hostname = False +ssl_context.verify_mode = ssl.CERT_NONE + +opener = urllib.request.build_opener(urllib.request.HTTPSHandler(context=ssl_context)) opener.addheaders = [("User-agent", "NUSspliBuilder/2.1")] urllib.request.install_opener(opener)