hbc/pywii/pywii-tools/tikfix.py

18 lines
293 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
wii.loadkeys()
tikfile = sys.argv[1]
2021-03-17 15:53:31 +01:00
print("fixing Tik file %s " % tikfile)
2016-11-23 06:35:12 +01:00
tik = wii.WiiTik(open(tikfile, "rb").read())
tik.null_signature()
tik.brute_sha()
tik.update()
f = open(tikfile,"wb")
f.write(tik.data)
f.close()