mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-29 06:25:30 -04:00
Disable HTTPS verification
This commit is contained in:
parent
65f06b064d
commit
18b36f5692
2 changed files with 8 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue