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

19 lines
312 B
Python
Executable File

#!/usr/bin/env python2
import sys, os, os.path
import pywii as wii
wii.loadkeys()
tmdfile = sys.argv[1]
print "TMD file %s:"%tmdfile
tmd = wii.WiiTmd(open(tmdfile, "rb").read())
tmd.null_signature()
tmd.brute_sha()
tmd.update()
tmd.parse()
tmd.showinfo(" ")
f = open(tmdfile,"wb")
f.write(tmd.data)
f.close()