mirror of
https://github.com/fail0verflow/hbc.git
synced 2024-11-17 23:29:21 +01:00
14 lines
220 B
Python
14 lines
220 B
Python
|
import md5, sys, struct
|
||
|
|
||
|
data= open(sys.argv[1]).read()
|
||
|
|
||
|
digest = md5.new(data).digest()
|
||
|
|
||
|
hdr = struct.pack(">4sI8x","IMD5",len(data))
|
||
|
|
||
|
f2 = open(sys.argv[2],"w")
|
||
|
f2.write(hdr)
|
||
|
f2.write(digest)
|
||
|
f2.write(data)
|
||
|
f2.close()
|