Language
md5 ํ๋ฒ์ ์ธ์ฝ๋ฉํ๊ธฐ :) ex)ํด๋์ง์
๐๐พ๐ฌ๐ฎ๐ฝ๐ฎ_๐ข๐ฝ๐ฎ๐ต๐ต๐ช
2016. 12. 18. 03:41
728x90
๋ฐ์ํ
# -*- coding: utf-8 -*-
import hashlib
import os
f = open('/Users/z3alous/Desktop/flag.txt', 'w')
def md5(fname):
hash_md5 = hashlib.md5()
with open(fname, "rb") as f:
for chunk in iter(lambda: f.read(4096), b""):
hash_md5.update(chunk)
return hash_md5.hexdigest()
for root, dirs, files in os.walk('ํด๋ ๊ฒฝ๋ก'):
for fname in files:
full_fname = os.path.join(root, fname)
f.write(md5(full_fname) + '\n')
f.close()
728x90
๋ฐ์ํ