1
+ import watchers .windowsdefender as WindowsDefender
2
+ import os , sys , time
3
+ import asyncio
4
+
5
+ def clear ():
6
+ if os .name == "nt" :
7
+ os .system ("cls" )
8
+ else :
9
+ os .system ("clear" )
10
+
11
+ watching_config = {
12
+ "WindowsDefender" : False
13
+ }
14
+
15
+ class colors :
16
+ darkred = "\033 [31m"
17
+ red = "\033 [91m"
18
+ lightred = "\033 [38;5;196m"
19
+ darkgreen = "\033 [32m"
20
+ green = "\033 [92m"
21
+ lightgreen = "\033 [38;5;46m"
22
+ darkyellow = "\033 [33m"
23
+ yellow = "\033 [93m"
24
+ lightyellow = "\033 [38;5;226m"
25
+ darkblue = "\033 [34m"
26
+ blue = "\033 [94m"
27
+ lightblue = "\033 [38;5;21m"
28
+ reset = "\033 [0m"
29
+
30
+ banner = f"""{ colors .blue }
31
+ ...:^^~~~~~~~^::..
32
+ .:!JPB#&@@@@@@@@@@@@@@@@@@@@&&BPJ!^.
33
+ .^7P#&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#P?^.
34
+ .!P&@@@@@@@@@&##@@@@@@@@@@@@@@@@@@@@@@@@@#&@@@@@@@@@&G7.
35
+ .~P&@@@@@@@&BY!..!G&@@@@@@@@@@@@@@@@@@@@@@@@@&5~:~YB&@@@@@@@&P!.
36
+ .7B@@@@@@@#Y~. ?&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B^ .^JB@@@@@@@#?.
37
+ !B@@@@@@&5~. ?@@@@@@@@@@@@@@&BGPPPG#&@@@@@@@@@@@@@#^ ^Y#@@@@@@#7.
38
+ :P@@@@@@#?. .#@@@@@@@@@@@G7: .^J#@@@@@@@@@@@Y .7B@@@@@@P:
39
+ ~B@@@@@&J. :@@@@@@@@@@&! .5@@@@@@@@@@G .?&@@@@@#!
40
+ ~#@@@@@B~ .&@@@@@@@@@7 ^JGGY~ .P@@@@@@@@@G :P@@@@@&!
41
+ ^#@@@@@P: B@@@@@@@@&. .#@@@@@@@~ ?@@@@@@@@@7 .Y@@@@@&~
42
+ .G@@@@@P. ^@@@@@@@@@: P@@@@@@@@@ P@@@@@@@@& .5@@@@@B.
43
+ 7@@@@@B. Y@@@@@@@@B ~@@@@@@@@5 .@@@@@@@@@: .G@@@@@J
44
+ Y@@@@@P P@@@@@@@@5 .JB&&#P^ &@@@@@@@@~ J@@@@@G
45
+ Y@@@@@5. Y@@@@@@@@B .@@@@@@@@@: Y@@@@@P.
46
+ :#@@@@@J ^@@@@@@@@@. Y@@@@@@@@& ?@@@@@&^
47
+ 7&@@@@@J. B@@@@@@@@&. !@@@@@@@@@J ?&@@@@@7
48
+ ?&@@@@@5. .@@@@@@@@@&~ Y@@@@@@@@@B .Y@@@@@@J
49
+ 7&@@@@@#! ^@@@@@@@@@@B~ ?&@@@@@@@@@# ~B@@@@@&?
50
+ ~B@@@@@@G~. .#@@@@@@@@@@&5^. .!G@@@@@@@@@@@P ~P@@@@@@#!
51
+ .Y&@@@@@@B?: J@@@@@@@@@@@@@&BG5JJJ5G#&@@@@@@@@@@@@&~ .7G@@@@@@&Y.
52
+ :Y&@@@@@@&G7: J&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#~ :7P&@@@@@@&5:
53
+ .?B@@@@@@@@#P?^..!G@@@@@@@@@@@@@@@@@@@@@@@@@@&P~.:7P#@@@@@@@@#J:
54
+ ^JB&@@@@@@@@&#GB&@@@@@@@@@@@@@@@@@@@@@@@&B#&@@@@@@@@@BJ^
55
+ .!YB&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&B5!.
56
+ .:!JPB&&@@@@@@@@@@@@@@@@@@@@@@&&BPJ!:.
57
+ ..:^~~7??????7~~^^...
58
+ { colors .reset } """
59
+
60
+ def main ():
61
+ divider = "-" * 20
62
+ while True :
63
+ clear ()
64
+
65
+ for char in banner :
66
+ sys .stdout .write (char )
67
+ sys .stdout .flush ()
68
+ time .sleep (0.0000001 )
69
+
70
+ print (colors .blue + "\n \n " + divider + " | LogSentry Watching | " + divider + colors .reset )
71
+ print (f"{ colors .darkblue } 1. Windows Defender: " + str (watching_config ["WindowsDefender" ]) + f"{ colors .reset } " )
72
+ print (f"{ colors .darkblue } 2. Start LogSentry{ colors .reset } " )
73
+
74
+ choice = input ("\n Enter your choice: " )
75
+ if choice == "1" :
76
+ watching_config ["WindowsDefender" ] = not watching_config ["WindowsDefender" ]
77
+ elif choice == "2" :
78
+ print (f"\n { colors .green } Windows Defender watcher was started!{ colors .reset } " )
79
+ while True :
80
+ try :
81
+ asyncio .run (WindowsDefender .Watch ())
82
+ except KeyboardInterrupt :
83
+ print (f"{ colors .red } Windows Defender watcher was stopped!{ colors .reset } " )
84
+ break
85
+ else :
86
+ print ("Invalid choice. Please try again." )
87
+ time .sleep (1 )
88
+
89
+ if __name__ == "__main__" :
90
+ main ()
0 commit comments