Python : 디렉터리 탐색 + 파일 내용 확인
2021. 3. 18. 23:22
파이썬 저장소
일단 아래와 같이 기본 틀을 만들었다. 이걸 활용하여 탐색한 모든 파일 내용 혹은 파일 자체 암호화를 만들어 볼 계획이다. import os from cryptography.fernet import Fernet import sys # from Crypto.Cipher import AES # from Crypto.Hash import SHA256 # from Crypto import Random files = [] def search(start_path, files): #파일의 경로 반환 for root, dirs, filess in os.walk(start_path): rootpath = os.path.join(os.path.abspath(start_path), root) # start_path의 절대경..