PyWii

From WiiBrew
Jump to navigation Jump to search
PyWii
General
Author(s)fail0verflow
TypePC utility
Version0.2
Links
Source

PyWii is a set of Python 2 written tools mainly concerning titles released by fail0verflow with the source code of the Homebrew Channel.

README

Python library to deal with Wii formats.

Currently has decent support for discs, partitions (including
accessing the partition data using read() and write(), with
caching), wads, and the structures contained within (certs,
tiks, tmds, etc)

Stuff may be broken. Some things are unfinished.

It also makes breakfast.

Tools

  • addhash.py Takes three arguments, each the path to a file. It calculates the SHA-1 of the second file, replaces all occurences of @SHA1SUM@ in the first file with this hash, and then writes the result to the third file.
  • arclist.py Prints a list of the files in a U8 archive.
  • arcpack.py Packs the path specified by the second argument into a U8 archive, and then saves it to the path specified by the first argument.
  • certinfo.py
  • discinfo.py Prints information about a Wii ISO.
  • dpkisign.py Signs a ticket or TMD with the XS or CP private key, respectively. While this code would work with the production/retail titles and keys, this tool is so named because these private keys are not publicly known, unlike the private keys for development systems.
  • ecchecksig.py
Usage: ecchecksig.py keyfile.[priv|pub] infile
  • ecgenpriv.py
Usage: ecgenpriv.py keyfile.priv
  • ecpriv2pub.py
Usage: ecpriv2pub.py keyfile.priv [keyfile.pub]
  • ecsign.py
Usage: ecsign.py keyfile.priv infile outfile
  • extract.py Extracts a partition from a Wii ISO.
Usage:
 python extract.py <encrypted ISO> <partition number> <file to extract to> [Partition offset] [length]
  • extractdol.py Extracts the main.dol from a Wii ISO.
Usage:
 python extractdol.py <encrypted ISO> <partition number> <dol output>
  • extractfiles.py Intended to extract files from a Wii ISO, though this was unfinished and this file is almost an identical copy of extract.py (except for the usage).
Usage:
 python extractfiles.py <encrypted ISO> <partition number> <root path to extract to>
  • getappldr.py Extracts the apploader from a Wii ISO and prints some information about it.
Usage:
 python getappldr.py <encrypted ISO> <partition number> <apploader text> <apploader trailer>
  • inject.py Replaces a partition of a Wii ISO, and then fakesigns it.
Usage:
 python inject.py <encrypted ISO> <partition number> <file to inject> [Partition offset] [data offset] [length]
  • injectdol.py Replaces the main.dol of a Wii ISO, and then fakesigns it.
Usage:
 python injectdol.py <encrypted ISO> <partition number> <dol to inject>
  • partsetios.py Sets the IOS version of a Wii ISO, and then fakesigns it.
Usage:
 python partsetios.py <encrypted ISO> <partition number> <IOS version>
 IOS version should be just the minor number (16, 33, etc) in decimal
  • rsapatch.py
  • saveinfo.py Broken. Calls function WiiSave(), which was presumably removed before release.
  • tikfix.py Fakesigns a ticket.
  • tikinfo.py Prints information about a ticket.
  • tmdfix.py Fakesigns a TMD.
  • tmdinfo.py Prints information about a TMD.
  • tmdupdatecr.py
  • tmdvers.py Sets the version number in a TMD.
  • wadinfo.py Prints information about a WAD.
  • wadpack.py Packs files into a WAD.
  • wadpack-boot2.py Pack files into a WAD to be installed as boot2.
  • wadunpack.py Extracts a WAD.

Breakfast Maker

In its root directory (unlike the rest of the tools), PyWii includes the program breakfast.py that "makes breakfast".

Breakfast Maker v0.2
Please enter your username: bushing
Making breakfast for bushing...
Cooking time will be approximately 1 minute and 40 seconds
00:01

Your breakfast is ready!

                              ____________
                       _oo=""[:[Y.  _dP"'Y8P"=po_
                   ,=P'`Y.-Y'   'd88` ,o`P.Yb`>_oPYp._
                ,8'   ,Y\`h. ,pP' _]Y[     ',Pd[  __.`Yo_
             ,=' `Y.`'   ]pP8[ pY''`,`\._pp''  `b`' `",pPYo_
           _d'_pPY.`o_,="' ,o`b     _d="Y. ,o`'P.`o,=P'  _ `o_
          d8`'    d=PYb pP'  Y.YL,=P'  __`h_   _oP'`b.oY' ` .Yo
         d'.Y.,pP'  ,o.Y.    ,pP'Yo pY'  "bYopP'  ]p.`b_  _oP''Y.
        8'_pP"Y. p`'  "b]bop''  ,-[Y.   _,='[`b.Y'   Y'8o8' _pP-]L
      ,dP"' _po`b    _,="'`b.-P'  ` ]boP'  ,YY.Yo   ,="' `b/'    Yb
     , 8o`o''  '.YopP'  _p-.Yb   _,='[`Y.P'    \.8oP' ,o''.`o_  _pPb
     Yd'`Y.   _pP''Y.,o''  ` '8oP'  ,d"L`o_  _pP'[ Yo[     Y'Zo8'  Y.
     P8 \ 8o=''  _pb`b     ,="[`YLP'    "'8oP' _pP`\.YL   ,="' `b.''b
     [Y,="' YL-p'   Y.YLpP'  ,d-b`h_   ,='' Yo`'    `>.8oF'  ]YY.`o_Y
     [Y[  ,-.`b     ,d"'YL-P'    Y 8oP'  ,='Y.YL    ,=' `YL-'    Y_Z8
     b`b`'   \ YLpP'  ,ob`h_    ,pP' Yo`'     '.8oP'  _p-b`Y.   ,=''8|
     Y Y.    ,=P'Y.-P'   P.YL,="'  pP\`Y.    _pP'`YL<''   Yb]bo''_p Pb
      b Y.op'' dp.`o     _dP'YL.pP'   `b`\.pP'  ,Y\`\.    ,d' `Y.' d [
      `. Yp_pP'  `,.Y._pP'  _o`Y.      ,bP`b.oP'   `L`b,=' _pP .`hd'd
       Y. YL       ]=P8. ,Y'  P.`o  ,="' _p.YL      ,d'`bp`'   `'d',P
        `. `\.  ,='' [ Y.      `'oP8[ _p'' `\.Y. ,=' _pY[Yo     d' P
         `b  `H[  _pP'`b`Y.   ,='  `Y.       'oPYL p''   Y.YL.dP ,P
           Y.  `Y.[     Y 8oP'  pY'P.`b    ,p' ,o`b_       'dP  d'
            `\.   `o.  _pP[ YL`'    `, 8oP' ,Y'  Y[Yo    ,='  ,P
              `\.    `YYo_`-b`b_    _,P''YL'       '.8pP'   ,Y'
                 Yo_     '"=poo8L_oP'  YY'`h_ __,p="''    pP
                   `"p.        ''`"""""--""""'''       ,Y'
                       '" o__                     _po`'
                            `'`--p----------op-`''

This program only recognizes the name bushing.

In an old revision of his user page, marcan said "the tools that are coming up are so awesome they'll even make breakfast for you," a possible reference to this program suggesting that PyWii was originally intended to be released much earlier than it was.