mirror of
https://github.com/fail0verflow/hbc.git
synced 2024-11-17 15:19:22 +01:00
14 lines
236 B
Python
14 lines
236 B
Python
import hashlib, sys, struct
|
|
|
|
data= open(sys.argv[1], "rb").read()
|
|
|
|
digest = hashlib.md5(data).digest()
|
|
|
|
hdr = struct.pack(">4sI8x",b"IMD5",len(data))
|
|
|
|
f2 = open(sys.argv[2],"wb")
|
|
f2.write(hdr)
|
|
f2.write(digest)
|
|
f2.write(data)
|
|
f2.close()
|