Skip to content
This repository has been archived by the owner on Aug 18, 2022. It is now read-only.
/ PyNUSD Public archive

A Wii and DSi NUS Downloader and WAD Generator for Python 3 (discontinued, also see "rewrite" branch)

License

Notifications You must be signed in to change notification settings

WiiDatabase/PyNUSD

Repository files navigation

PyNUSD

This is a Wii and DSi NUS downloader written in Python 3(.6). It uses my own WADGEN, completely written from scratch to create WADs from CDN content. PyNUSD can even create tickets from encrypted title keys.

It uses the pycryptodome and requests modules, so you'll need to install them with e.g. pip. Based on 3DS-NUSD.

"WADGEN" can create WADs from cetk + tmd + contents completely in Python. It can also unpack a WAD to its CDN contents, decrypt them, show information and much more!

Features

PyNUSD

  • Downloads Wii, vWii and DSi titles from the Nintendo Update Server
  • Can decrypt contents and pack them as valid WAD
  • Also accepts encrypted title keys
  • Verifies existing and newly downloaded files via SHA1 sum (only for those with ticket)
  • Supports CDN mirrors through the --base parameter
  • Uses my own WADGEN, completely tested, verified and written from scratch

WADGEN

  • Can be used as independent library
  • Creates valid WADs which are nearly the same as the one from Discs (only missing the footer)
  • Doesn't modify the original TMD and contents like NUSD
  • Can handle DSi titles (but not pack them obviously)
  • Verifies Signature (place root-key in the same directory)
  • Can fix WADs with wrong common key index and wrong certificate chain

Usage

usage: PyNUSD.py [-h] [--nopack] [--decrypt] [--deletecontents] [--nolocaluse]
                 [--key ENCRYPTED_KEY] [--onlyticket] [--cdn]
                 [--base BASE_URL]
                 titleid [titleversion]

positional arguments:
  titleid              Title ID
  titleversion         Title version (default: Latest)

optional arguments:
  -h, --help           show this help message and exit
  --nopack             Do not generate WAD
  --decrypt            Create decrypted contents (*.app)
  --deletecontents     Do not keep contents
  --nolocaluse         Don't use local files (SHA1 sum verifying)
  --key ENCRYPTED_KEY  Encrypted title key for Ticket generation
  --onlyticket         Only create the ticket, don't store anything
  --cdn                Store contents like on CDN (without version directory)
  --base BASE_URL      Base URL for CDN download

TODO

  • More Error handling and retrying
  • Improve error handling in WADGEN, especially for certificates and too short tmds/tickets
  • Support for decrypting
  • SHA1 verify
  • uselocal parameter (needs decrypting & SHA1 verifying)
  • WADMaker: Support TMDs with number (e.g. tmd.512)
  • Add flag for not using version directories, just the TID (like CDN structure)
  • Also verify first time downloaded files
  • GUI?

Credits

  • Daeken for original Struct.py
  • grp for Wii.py

Screenshots

Screenshot

Screenshot2

About

A Wii and DSi NUS Downloader and WAD Generator for Python 3 (discontinued, also see "rewrite" branch)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages