Language

md5 ํ•œ๋ฒˆ์— ์ธ์ฝ”๋”ฉํ•˜๊ธฐ :) ex)ํด๋”์ง€์ •

๐“›๐“พ๐“ฌ๐“ฎ๐“ฝ๐“ฎ_๐“ข๐“ฝ๐“ฎ๐“ต๐“ต๐“ช 2016. 12. 18.
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
๋ฐ˜์‘ํ˜•

'Language' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

base image.py  (0) 2016.12.21
python ๊ฐ™์€ ํŒŒ์ผ ๋ฝ‘์•„๋‚ด๊ธฐ :)  (0) 2016.12.18
rsa.py_ctf  (0) 2016.12.12
toolhelp  (0) 2015.09.24
C์–ธ์–ด ์ •๋ฆฌ  (0) 2015.09.22

๋Œ“๊ธ€