Language

python ๊ฐ™์€ ํŒŒ์ผ ๋ฝ‘์•„๋‚ด๊ธฐ :)

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

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

image GPS.py  (0) 2016.12.21
base image.py  (0) 2016.12.21
md5 ํ•œ๋ฒˆ์— ์ธ์ฝ”๋”ฉํ•˜๊ธฐ :) ex)ํด๋”์ง€์ •  (0) 2016.12.18
rsa.py_ctf  (0) 2016.12.12
toolhelp  (0) 2015.09.24

๋Œ“๊ธ€