-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnotif.py
61 lines (45 loc) · 2.09 KB
/
notif.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
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
from plyer import notification
import easygui
from os import startfile
from ransomware import Soldier
def notif(input_extension ):
notification.notify(
title="You have a suspicious extension",
message=f"{input_extension} extension A common extension was not detected",
timeout=50
)
return
def add_extension (extension , file_name):
with open(file_name , "a") as file:
file.write(f"\\{extension}")
def maseg_Box_path(woring_extension , path_file):
msg = """First check if this is a safe extension or not?
To do this, you can see the folder containing that file by clicking the "Path" button
You can start by trying to open the suspicious file
If the system could not execute the file properly with certain software, we may be dealing with a malicious extension
If the extension was secure, you can add it to the list of secure extensions by clicking the "Safe" button.
"""
Answer = easygui.buttonbox(msg, "See the route", ("path" , "safe" ,"Unsecured"))
if Answer == "path":
startfile(path_file)
elif Answer == "safe":
Answer_local = easygui.ynbox("If you are sure, click the Yes button to add it to the list of safe" , "Are you sure it's safe?")
if Answer_local:
add_extension(woring_extension , "SafeExtension.txt")
else:
maseg_Box_path(woring_extension , path_file)
elif Answer == "Unsecured" :
Answer_local = easygui.ynbox("If you are sure, click the Yes button to add it to the list of Unsecured" , "Are you sure it's Unsecured?")
if Answer_local:
Soldier(woring_extension)
else:
maseg_Box_path(woring_extension , path_file)
def maseg_Box(woring_extension , path_file):
"if yuo no extension"
msg = f"""We found a suspicious extension called "{woring_extension}" Do you consider this extension secure?"""
Answer = easygui.ynbox(msg ,"We found a suspicious extension" )
if Answer:
print("yes")
pass
else:
maseg_Box_path(woring_extension ,path_file)