mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-09 13:52:02 -04:00
26 lines
652 B
Python
26 lines
652 B
Python
#!/bin/env python
|
|
|
|
import os
|
|
import urllib.request
|
|
import ssl
|
|
|
|
# Don't edit below this line
|
|
|
|
|
|
def checkAndDeleteFile(file):
|
|
if os.path.exists(file):
|
|
print(f"Deleting {file}")
|
|
os.remove(file)
|
|
|
|
|
|
# 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)
|
|
|
|
checkAndDeleteFile("db.go")
|
|
urllib.request.urlretrieve("https://napi.v10lator.de/db?t=go", "db.go")
|