ihaveamac / wiiu-things

some Wii U scripts and things

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to download updates

jkms opened this issue · comments

commented

Anytime I try and download an update (anything starting with 0005000E), I receive a 503 error. Regular downloads (00050000) still work fine. I was a little gun-shy to post, after the last issue seemed to resolve itself, but this has been consistent for a few days.

$ python3 wiiu_cdndownload.py 0005000exxxxxxxx
Downloading CETK (title.tik)...
Traceback (most recent call last):
  File "wiiu_cdndownload.py", line 80, in <module>
    download(base + '/cetk', False, f)
  File "wiiu_cdndownload.py", line 48, in download
    cn = urlopen(url)
  File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 503: Service Unavailable

Thoughts?

It seems to be failing at downloading the ticket. Maybe I should catch that in case the rest of the contents are available...

commented

It seems to have to do with the two servers:

sysbase = 'http://nus.cdn.c.shop.nintendowifi.net/ccs/download/' + tid
appbase = 'http://ccs.cdn.c.shop.nintendowifi.net/ccs/download/' + tid

the "nus" server doesn't work for updates, but the ccs server does.

I was able to make it work by commenting out line 76:

if tid[4:8] not in app_categories:
#    base = sysbase
    print('Downloading CETK (title.tik)...')
    with open(tid + '/title.tik', 'wb') as f:
        download(base + '/cetk', False, f)

Please read my post here. ^-^ I would like to contribute your script of what is found to that of something else. The only things useful here that can be used are extract.py and decrypt py.
As the servers for updates will not work as contributed. If it is the ccs server, it is from source.

TomEke/WiiU-Title-Key#38

In file wiiu_cdndownload add the line 26 '000E', to be able to download updates

app_categories = {
'0000', # application
'0002', # demo
'000C', # DLC
'000E', # update
}