Language
python ๊ฐ์ ํ์ผ ๋ฝ์๋ด๊ธฐ :)
๐๐พ๐ฌ๐ฎ๐ฝ๐ฎ_๐ข๐ฝ๐ฎ๐ต๐ต๐ช
2016. 12. 18. 04:51
728x90
๋ฐ์ํ
์ฌ์ ํ์ผ์ ํ์ผ์ด๋ฆ๊ณผ ํด๋๋ฅผ ์ง์ ํด์ฃผ๋ฉด ์ค๋ณตํ์ผ์ ๋ฝ์์ค๋๋ค :)
# -*- coding: utf-8 -*-
import os
f = open('/Users/z3alous/Desktop/flag1.txt', 'w') <- ์ ์ฅ๊ฒฝ๋ก
re = open('/Users/z3alous/Desktop/flag.txt') # MD5๊ฐ ๋ค์ด์๋ TXT
ree = re.readlines()
for root, dirs, files in os.walk('/Users/z3alous/Downloads/'): <-ํด๋๊ฒฝ๋ก
for fname in files:
full_fname = os.path.join(fname)
ffname = full_fname
ffname = ffname.strip()
for x in ree:
x = x.strip()
if ffname == x:
f.write(ffname + "\n")
f.close()
re.close()
728x90
๋ฐ์ํ