5
5
from prompt_toolkit import prompt
6
6
from prompt_toolkit .shortcuts import message_dialog
7
7
from prompt_toolkit .shortcuts import yes_no_dialog
8
+ from prompt_toolkit .shortcuts import input_dialog
8
9
import time
9
10
import bcrypt
11
+ from datetime import datetime
12
+ from prompt_toolkit import print_formatted_text , HTML
13
+
14
+
10
15
11
16
# Loading screen with VAIIYA SECURITY ASCII Art
12
17
def startup_screen_ASCII ():
@@ -70,8 +75,16 @@ def main_menu():
70
75
|______||______||______||______||______||______||______||______||______||______||______||______||______|
71
76
72
77
Welcome to the VAIIYA terminal!
73
- Use this handy dandy terminal for all your duties at VAIIYA security corp!
78
+ Use this handy dandy terminal for all your duties at VAIIYA cybersecurity corp!
74
79
""" )
80
+ def timefetch ():
81
+ #time fetch for login
82
+ curtime = datetime .now ().strftime ('%H:%M:%S' )
83
+ curdate = datetime .now ().strftime ('%Y-%m-%d' )
84
+
85
+ print ('Welcome VAIIYA trustee! the time is: ' ,curtime )
86
+ print ('and the date is: ' ,curdate )
87
+ print ("have a wonerful day at VAIIYA cybersecurity corp!" )
75
88
76
89
# Start the TERMINAL and its commands
77
90
def open_terminal ():
@@ -80,6 +93,13 @@ def open_terminal():
80
93
print (" for a list of commands, please type 'commands' " )
81
94
text = prompt ('awaiting command(s)>>> ' )
82
95
#put all the usercommands under here please!
96
+
97
+
98
+
99
+
100
+
101
+
102
+
83
103
if text == 'CNS' :
84
104
print ("running secondary program..." )
85
105
time .sleep (2 )
@@ -127,6 +147,12 @@ def open_terminal():
127
147
128
148
# PLEASE PUT ALL 2ND DEF(S) BELOW THIS NOTE!
129
149
150
+
151
+
152
+
153
+
154
+
155
+ #PUT ALL OTHER NON SUBCOMMAND DEFs BELOW HERE!
130
156
# the CNS EE below this messange
131
157
def CNS_EE_HAKED ():
132
158
result = yes_no_dialog (
@@ -149,6 +175,8 @@ def CNS_EE_HAKED():
149
175
time .sleep (4 )
150
176
exit ()
151
177
178
+
179
+
152
180
#add passwords here for the logins and name the vars respectivly
153
181
#hehe youll never get the passwords now! AHAHAHAHAHA!
154
182
#walkerpasswrd1
@@ -159,34 +187,36 @@ def CNS_EE_HAKED():
159
187
160
188
#walker login here
161
189
def walker_login ():
162
- print ("Welcome walker! please put in your password that i gave you!" )
163
- print ("To exit, please type 'EXIT' in the password prompt!" )
190
+
164
191
#password prompt;
165
- userpassword = text = prompt ('walkers password: ' , is_password = True )
192
+ userpassword = text = input_dialog (
193
+ title = 'Walker password input' ,
194
+ text = 'walker password:' ).run ()
166
195
#encodes the given password for comapare
167
196
userpassword = userpassword .encode ('utf-8' )
168
-
197
+
169
198
#comapre password hashes, if identical then "result" == True, then it will move onto walker_entered
170
199
result = bcrypt .checkpw (userpassword , walkerhash )
171
200
if result :
172
201
walker_entered ()
173
- if text == 'exit' :
174
- return
175
202
#end of walker password varifi
203
+
176
204
def walker_entered ():
177
205
print ("welcome walker! here currnently there is nothing, i have no idea what to put here for you guys." )
178
206
print ("but id assume you are familiar with github so if you have an idea i would more than glad take a look and try to implement it! " )
179
207
text = prompt ("type EXIT to exit this page; " )
180
208
if text == 'exit' :
181
209
return
182
- #end of walker login/EE
210
+ #end of walker login
183
211
184
212
# FROST EE STUFF OVER HERE!
185
213
def frostbyte_login ():
186
214
187
215
188
216
print ("to exit, type EXIT in the password!" )
189
- userpassword = text = prompt ('frotbytes password: ' , is_password = True )
217
+ userpassword = text = input_dialog (
218
+ title = 'frostbyte password input' ,
219
+ text = 'frostbyte password:' ).run ()
190
220
191
221
userpassword = userpassword .encode ('utf-8' )
192
222
@@ -198,8 +228,23 @@ def frostbyte_login():
198
228
return
199
229
# 2nd part to the FROST EE
200
230
def frostbytes_EE_entered ():
231
+
232
+ message_dialog (
233
+ title = 'VAIIYA Warning systems' ,
234
+ text = 'VAIIYA TERMINAL WARNING AWAITING ATTENTION!' ).run ()
235
+
236
+ message_dialog (
237
+ title = 'VAIIYA Warning systems' ,
238
+ text = 'VAIIYA employee T342 has marked you as "requires careful observation and mental medical attention." so the VAIIYA system observation drones will now observe you.' ).run ()
239
+
240
+ message_dialog (
241
+ title = 'VAIIYA Warning systems' ,
242
+ text = 'thank you for your attention. you may continue your tasks and have a safe day!' ).run ()
243
+
244
+
201
245
print (f"""welcome frostbyte! to your ee/login! dont worry, no one will find your password ^_+ """ )
202
246
text = prompt ("type EXIT to exit this page;" )
247
+
203
248
if text == 'exit' :
204
249
return
205
250
#END OF FROST EE CODE,
@@ -211,6 +256,7 @@ def game_loop():
211
256
startup_screen_ASCII ()
212
257
loading_bars_into ()
213
258
main_menu ()
259
+ timefetch ()
214
260
open_terminal ()
215
261
216
262
while True :
0 commit comments