Disable HTTPS verification

This commit is contained in:
Xpl0itU 2023-07-19 02:01:46 +02:00
parent 65f06b064d
commit 18b36f5692
2 changed files with 8 additions and 3 deletions

View file

@ -16,10 +16,9 @@ jobs:
msystem: UCRT64 msystem: UCRT64
release: true release: true
update: 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 - name: Build
run: | run: |
python3 -m pip install pip-system-certs
python3 grabTitles.py python3 grabTitles.py
go build cmd/WiiUDownloader/*.go go build cmd/WiiUDownloader/*.go
- name: Deploy WiiUDownloader - name: Deploy WiiUDownloader

View file

@ -2,6 +2,7 @@
import os import os
import urllib.request import urllib.request
import ssl
# Don't edit below this line # Don't edit below this line
@ -10,7 +11,12 @@ def checkAndDeleteFile(file):
print(f"Deleting {file}") print(f"Deleting {file}")
os.remove(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")] opener.addheaders = [("User-agent", "NUSspliBuilder/2.1")]
urllib.request.install_opener(opener) urllib.request.install_opener(opener)