-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdecryption.py
33 lines (25 loc) · 974 Bytes
/
decryption.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import pyAesCrypt
import os
import sys
condition_list = []
PATH = 'C:\\STUDY_MATERIAL\\Data_\\DATA\\Project_Bat\\.idea\\IMP'
allfiles = []
for root, subfiles, files in os.walk(PATH):
for names in files:
allfiles.append(os.path.join(root,names))
# print(allfiles)
for file in allfiles:
if file.endswith('.aes') is True :
# condition_list.append(os.path.basename(file))
print("Decrypting.....{}".format(os.path.basename(file)))
pyAesCrypt.decryptFile('{}'.format((file)),
'{}'.format((file).replace('.aes','')),
'{}'.format('242004'),
bufferSize=(64*1024))
os.remove((file))
else:
print('{} -- '.format(file)+"Not Encrypted")
# if len(condition_list)>0:
# print("...DECRYPTION_COMPLETE...")
# if len(condition_list)==0 or None:
# print("\nTHE FILES ARE NOT ENCRYPTED....")