mirror of
https://github.com/FIX94/hbc.git
synced 2024-11-26 04:24:18 +01:00
4cf05be0ff
-added wiiu gamepad compatibility when booting from wii vc with patched fw.img using libwiidrc -removed upper file limit from wiiload (useful when used with wiiu homebrew launcher)
36 lines
666 B
Python
Executable File
36 lines
666 B
Python
Executable File
#!/usr/bin/env python2
|
|
|
|
import sys, os, os.path
|
|
import pywii
|
|
|
|
pywii.loadkeys_dpki()
|
|
|
|
args = sys.argv[1:]
|
|
mode = args.pop(0)
|
|
infile = args.pop(0)
|
|
outfile = args.pop(0)
|
|
certfile = args.pop(0)
|
|
issuer = args.pop(0)
|
|
|
|
if sys.argv[1] == "-cetk":
|
|
signed = pywii.WiiTik(open(infile, "rb").read())
|
|
elif sys.argv[1] == "-tmd":
|
|
signed = pywii.WiiTmd(open(infile, "rb").read())
|
|
else:
|
|
print "EYOUFAILIT"
|
|
sys.exit(1)
|
|
|
|
certs, certlist = pywii.parse_certs(open(certfile,"rb").read())
|
|
|
|
signed.update_issuer(issuer)
|
|
|
|
if not signed.sign(certs):
|
|
print "dpki signing failed"
|
|
sys.exit(1)
|
|
|
|
open(outfile, "wb").write(signed.data)
|
|
|
|
print "successfully signed %s" % outfile
|
|
sys.exit(0)
|
|
|