mirror of
https://github.com/FIX94/hbc.git
synced 2024-11-26 04:24:18 +01:00
12 lines
259 B
Python
12 lines
259 B
Python
|
#!/usr/bin/env python
|
||
|
import sys
|
||
|
import re
|
||
|
import pywii as wii
|
||
|
|
||
|
hash = wii.SHA.new(open(sys.argv[2]).read()).digest().encode("hex")
|
||
|
f = open(sys.argv[1], "r")
|
||
|
data = f.read()
|
||
|
f.close()
|
||
|
data = re.sub('@SHA1SUM@', hash, data)
|
||
|
open(sys.argv[3], "w").write(data)
|