tmdfix.py 312 B

12345678910111213141516171819
  1. #!/usr/bin/env python2
  2. import sys, os, os.path
  3. import pywii as wii
  4. wii.loadkeys()
  5. tmdfile = sys.argv[1]
  6. print "TMD file %s:"%tmdfile
  7. tmd = wii.WiiTmd(open(tmdfile, "rb").read())
  8. tmd.null_signature()
  9. tmd.brute_sha()
  10. tmd.update()
  11. tmd.parse()
  12. tmd.showinfo(" ")
  13. f = open(tmdfile,"wb")
  14. f.write(tmd.data)
  15. f.close()