hbc/pywii/pywii-tools/rsapatch.py

21 lines
375 B
Python
Raw Normal View History

2021-03-17 15:53:31 +01:00
#!/usr/bin/env python3
2016-11-23 06:35:12 +01:00
import sys, os, os.path
import pywii as wii
def hexdump(s):
2021-03-17 15:53:31 +01:00
return ' '.join(["%02x"%x for x in list(map(ord,s))])
2016-11-23 06:35:12 +01:00
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()