hbc/pywii/pywii-tools/rsapatch.py
2016-11-30 18:57:03 +09:00

21 lines
373 B
Python
Executable File

#!/usr/bin/env python2
import sys, os, os.path
import pywii as wii
def hexdump(s):
return ' '.join(map(lambda x: "%02x"%x,map(ord,s)))
isofile = sys.argv[1]
disc = WiiDisc(isofile)
disc.showinfo()
part = WiiPartition(disc,int(sys.argv[2]))
part.showinfo()
part.tmd.update_signature(file("signthree.bin").read())
part.tmd.brute_sha()
part.updatetmd()
part.showinfo()