11
11
import bcrypt
12
12
from datetime import datetime
13
13
from prompt_toolkit import print_formatted_text , HTML
14
-
14
+ import random
15
15
#changes the size of the Command promp so it is easyer to read (and that the ASCII doesnt soft wrap)
16
16
17
17
def window_resize_startup ():
18
18
#put the CMD reisze code here, this is disabled for the tiem being
19
19
CMD = "mode 1000,1000"
20
20
os .system (CMD )
21
21
22
+ #this idea was requested by Smashel on issue #30.
23
+ #defualt value is 1-5650
24
+ #if it somehow gets that number the ascii will "corrupt" and use an alt
25
+ def startup_screen_ascii_roll ():
26
+ corrupted_ascii_roll = random .randint (1 ,5650 )
27
+ #normal value for this var is 3479
28
+ if corrupted_ascii_roll == 3479 :
29
+ corrupted_ascii_startup_screen ()
30
+
31
+ else :
32
+ norm_startup_screen_ASCII ()
33
+
34
+ #if the number is rolled correctly, then this ASCII will play instead of the norm.
35
+ def corrupted_ascii_startup_screen ():
36
+ print (r"""
37
+
38
+ ERR! NORM ASCII STARTUP FAILURE, USING ALT ASCII. APPLICATION IS STILL USEABLE.
39
+ _____ _____
40
+ \____\ \____\
41
+ _____ _____ ______ _____ _____ _____ _____ ______
42
+ \ \ / / / \ \ \ \ \ \ \ / / / \
43
+ \ \ / / / \ \ \ \ \ \ \ / / / \
44
+ \ \/ / / /\ \ \ \ \ \ \ \/ / / /\ \
45
+ \ / / / \ \ \ \ \ \ \ / / / \ \
46
+ \______/ /____/ \____\ \____\ \____\ \ / /____/ \____\
47
+ / /
48
+ / /
49
+ /_____/
50
+ VAIIYA technologies LLC
51
+ Empowering security, one byte at a time.
52
+
53
+
54
+ please wait while the program does mandatory checks.
55
+
56
+ """ )
22
57
23
58
24
59
25
60
#NOTE: THERE MAY BE MINOR LINE WRAP IN THE ASCII
26
61
27
62
# Loading screen with VAIIYA SECURITY ASCII Art
28
- def startup_screen_ASCII ():
63
+ def norm_startup_screen_ASCII ():
29
64
print (r"""
30
65
31
66
@@ -34,17 +69,17 @@ def startup_screen_ASCII():
34
69
\|||||||||\ \::::::::::\
35
70
\|||||||||\ \::::::::::\
36
71
\|||||||||\ \::::::::::\
37
- \-------\ /--------/ /-------\ \--------\ \--------\ \--------\ /---------/ /------- \
38
- \.......\ /......../ /.........\ \........\ \........\ \........\ /........./ /......... \
39
- \.......\ /......../ /...........\ \........\ \........\ \........\ /........./ /........... \
40
- \.......\ /......../ /.............\ \........\ \........\ \........\ /........./ /............. \
41
- \.......\ /......../ /......__.......\ \........\ \........\ \........\ /........./ /............... \
42
- \.......\ /......../ /....../ \.......\ \........\ \........\ \........\_/........./ /....... / \......\
43
- \.......\ /......../ /....../ \.......\ \........\ \........\ \................../ /....... / \......\
44
- \................/ /....../ \.......\ \........\ \........\ \................/ /....... / \......\
45
- \............../ /....../ \.......\ \........\ \........\ \............../ /....... / \......\
46
- \............/ /....../ \.......\ \........\ \........\ \............/ /....... / \......\
47
- \........../ /....../ \.......\ \........\ \........\ \........../ /....... / \......\
72
+ \-------\ /--------/ /-------\ \--------\ \--------\ \--------\ /---------/ /------\
73
+ \.......\ /......../ /.........\ \........\ \........\ \........\ /........./ /........\
74
+ \.......\ /......../ /...........\ \........\ \........\ \........\ /........./ /..........\
75
+ \.......\ /......../ /.............\ \........\ \........\ \........\ /........./ /............\
76
+ \.......\ /......../ /......__.......\ \........\ \........\ \........\ /........./ /..............\
77
+ \.......\ /......../ /....../ \.......\ \........\ \........\ \........\_/........./ /....../ \......\
78
+ \.......\ /......../ /....../ \.......\ \........\ \........\ \................../ /....../ \......\
79
+ \................/ /....../ \.......\ \........\ \........\ \................/ /....../ \......\
80
+ \............../ /....../ \.......\ \........\ \........\ \............../ /....../ \......\
81
+ \............/ /....../ \.......\ \........\ \........\ \............/ /....../ \......\
82
+ \........../ /....../ \.......\ \........\ \........\ \........../ /....../ \......\
48
83
/........./
49
84
/........./
50
85
/........./
@@ -82,9 +117,24 @@ def loading_bars_intro_2():
82
117
for i in pb (range (215 ), label = label ):
83
118
time .sleep (.01 )
84
119
time .sleep (1 )
120
+ #generates a 5 digit number from 0-9
121
+ securecodestartup1 = random .randint (0 ,9 )
122
+ securecodestartup2 = random .randint (0 ,9 )
123
+ securecodestartup3 = random .randint (0 ,9 )
124
+ securecodestartup4 = random .randint (0 ,9 )
125
+ securecodestartup5 = random .randint (0 ,9 )
126
+
127
+ print ('Codes found! code is:' )
128
+ time .sleep (1.5 )
129
+ #prints that generated number
130
+ print (securecodestartup1 ,securecodestartup2 ,securecodestartup3 ,securecodestartup4 ,securecodestartup5 )
131
+ print ("checking.... system expected code is:" )
132
+ time .sleep (1.5 )
133
+ print (securecodestartup1 ,securecodestartup2 ,securecodestartup3 ,securecodestartup4 ,securecodestartup5 )
134
+ time .sleep (2 )
135
+ print ("code approved! moving on..." )
136
+ #a cool lil thing for a secure startup!
85
137
86
- print ("codes found! checking with system.... approved!" )
87
- time .sleep (0.2 )
88
138
89
139
def loading_bars_intro_3 ():
90
140
@@ -112,22 +162,22 @@ def main_menu():
112
162
\|||||||||\ \::::::::::\
113
163
\|||||||||\ \::::::::::\
114
164
\|||||||||\ \::::::::::\
115
- \-------\ /--------/ /-------\ \--------\ \--------\ \--------\ /---------/ /-------\
116
- \.......\ /......../ /.........\ \........\ \........\ \........\ /........./ /.........\
117
- \.......\ /......../ /...........\ \........\ \........\ \........\ /........./ /...........\
118
- \.......\ /......../ /.............\ \........\ \........\ \........\ /........./ /.............\
119
- \.......\ /......../ /......__.......\ \........\ \........\ \........\ /........./ /...............\
120
- \.......\ /......../ /....../ \.......\ \........\ \........\ \........\_/........./ /......./ \......\
121
- \.......\ /......../ /....../ \.......\ \........\ \........\ \................../ /......./ \......\
122
- \................/ /....../ \.......\ \........\ \........\ \................/ /......./ \......\
123
- \............../ /....../ \.......\ \........\ \........\ \............../ /......./ \......\
124
- \............/ /....../ \.......\ \........\ \........\ \............/ /......./ \......\
125
- \........../ /....../ \.......\ \........\ \........\ \........../ /......./ \......\
126
- /........./
165
+ \-------\ /--------/ /------\ \--------\ \--------\ \--------\ /---------/ /-------\
166
+ \.......\ /......../ /........\ \........\ \........\ \........\ /........./ /.........\
167
+ \.......\ /......../ /..........\ \........\ \........\ \........\ /........./ /...........\
168
+ \.......\ /......../ /............\ \........\ \........\ \........\ /........./ /.............\
169
+ \.......\ /......../ /......__......\ \........\ \........\ \........\ /........./ /...............\
170
+ \.......\ /......../ /....../ \......\ \........\ \........\ \........\_/........./ /......./ \......\
171
+ \.......\ /......../ /....../ \......\ \........\ \........\ \................../ /......./ \......\
172
+ \................/ /....../ \......\ \........\ \........\ \................/ /......./ \......\
173
+ \............../ /....../ \......\ \........\ \........\ \............../ /......./ \......\
174
+ \............/ /....../ \......\ \........\ \........\ \............/ /......./ \......\
175
+ \........../ /....../ \......\ \........\ \........\ \........../ /......./ \......\
127
176
/........./
128
177
/........./
129
178
/........./
130
- /---------/
179
+ /........./
180
+ /---------/
131
181
VAIIYA technologies LLC
132
182
Empowering security, one byte at a time.
133
183
@@ -141,45 +191,73 @@ def timefetch():
141
191
print ("""|""" )
142
192
print ('Welcome VAIIYA trustee! the time is: ' ,curtime )
143
193
print ('and the date is: ' ,curdate )
144
- print ("have a wonerful day at VAIIYA Technologies LLC!" )
194
+ print ("have a wonderful day at VAIIYA Technologies LLC!" )
145
195
print ("""|""" )
146
- # Start the TERMINAL and its commands
196
+
197
+ #this is here so that this doesnt dupe every time the commandline reprints. it now only happens once.
147
198
def terminal_start_message ():
148
199
print (" for a list of commands, please type 'commands' " )
149
200
print ("""|""" )
150
201
202
+ #TERMINAL BEHAVIOR NOTES! make sure to use `elif` instead of `if`. this will prevent the error string from printing if we retun from the EEs or logins.
203
+ #
204
+ #
205
+ #notes here^^^
151
206
207
+
208
+ #Starts the TERMINAL and its commands
152
209
def open_terminal ():
153
210
154
211
while True :
155
212
156
213
text = prompt ('awaiting command(s)>>> ' )
157
214
#put all the usercommands under here please!
158
-
215
+ #this is the FIRST `if`, replace and all new should be `elif`.
216
+ if text == 't342' :
217
+ print ('heyy thanks for sayin somthin!' )
218
+ continue
219
+ #this is BELOW the first command. put `elif` on all new commands.
220
+
221
+ #the credits for the game!
222
+ elif text == 'credits' :
223
+ print ("""|""" )
224
+ print ("""|""" )
225
+ print ("The credits of VAIIYA terminal!" )
226
+ print ("""|""" )
227
+ print ("Owner: T342, T342guy or Nathan johnson." )
228
+ print ("""|""" )
229
+ print ("contributors: " )
230
+ print ("Smashel from discord." )
231
+ print ("Riskit from discord." )
232
+ print ("""|""" )
233
+ print ("""|""" )
234
+ print ("and thats all for now! have fun, stay safe and secure! VAIIYA trustees and THE FINALS contestants!" )
235
+ print ("""|""" )
236
+
159
237
238
+ #the link given will NEVER EXPIRE
239
+ elif text == 'discord' :
240
+ print ("""|""" )
241
+ print (" the invite link to The VAIIYA Hub and VAIIYA Terminal news!: https://discord.gg/Qt5Je9sFE5 " )
242
+ print ("""|""" )
243
+
160
244
161
-
162
-
163
-
164
-
165
- if text == 'CNS' :
245
+
246
+ elif text == 'CNS' :
166
247
print ("CNS_VAIIYA_BYPASS_V4.567.EXE EXITCUTING...." )
167
248
time .sleep (2 )
168
249
CNS_EE_HAKED ()
169
-
170
- if text == 't342' :
171
- print ('heyy thanks for sayin somthin!' )
172
- continue
173
250
174
-
175
- if text == 'walker' :
251
+
252
+ #walkers login, requires password. this will print the following, stop for 3 secs and then runs the `walker_login()`.
253
+ elif text == 'walker' :
176
254
print ("welcome walker to your login! please wait while your coffee brews......." )
177
255
time .sleep (3 )
178
256
walker_login ()
179
257
180
- #BUG: the error "no command" will reply when exiting the FROST EE!
258
+ #the `no- command bug has been resolved.`
181
259
# FROST EE WIP!!
182
- if text == 'frostbyte' :
260
+ elif text == 'frostbyte' :
183
261
print ("welcome frostbyte to your login! please wait while i startup the supercomputer and freeze these bytes!...." )
184
262
time .sleep (3 )
185
263
#enters the frostbyte EE
@@ -188,25 +266,28 @@ def open_terminal():
188
266
189
267
#below are all the non-user commands, DO NOT REMOVE!
190
268
#the COMMANDS directory, DO NOT REMOVE!
191
- if text == 'commands' :
269
+ elif text == 'commands' :
192
270
print ("""|""" )
193
271
print ("""|""" )
194
272
print ("Avalible commands: (all may not be listed.)" )
195
273
print ("""|""" )
196
- print ("command: walker | The login for CM|walker" )
197
- print ("command: frostbyte | The login for CM|frostbyte" )
274
+ print ("command; walker | The login for CM|walker" )
275
+ print ("command; frostbyte | The login for CM|frostbyte" )
198
276
print ("placeholder here | explanation here" )
199
277
print ("placeholder here | explanation here" )
200
- print ("""C0MM#ND: CNS | {ERROR: UNKNOWN PROGRAM ENTITY}""" )
278
+ print ("""C0MM#N0D;;.."' CNS | {ERROR: UNKNOWN PROGRAM ENTITY}""" )
279
+ print ("""|""" )
280
+ print ("""|""" )
281
+ print ("""command; credits | the credits to the game! (^///^) """ )
282
+ print ("command; discord | get a invite link to The VAIIYA hub!, a hang-about and VAIIYA-terminal server!" )
201
283
print ("""|""" )
202
284
print ("""|""" )
203
-
204
285
205
286
#the EXIT command, DO NOT REMOVE!!
206
287
elif text == 'exit' :
207
288
print ('exiting the terminal... have a nice day!' )
208
289
time .sleep (0.5 )
209
- exit ()
290
+ quit ()
210
291
211
292
#error response
212
293
else :
@@ -219,7 +300,7 @@ def open_terminal():
219
300
220
301
221
302
222
- #PUT ALL OTHER NON SUBCOMMAND DEFs BELOW HERE!
303
+ #PUT ALL FUNC DEFS BELOW HERE!
223
304
# the CNS EE below this messange
224
305
def CNS_EE_HAKED ():
225
306
#below is the Y/N prompt for CNS, and the following `result` can be split into a bool and set as True or False
@@ -242,7 +323,7 @@ def CNS_EE_HAKED():
242
323
time .sleep (1 )
243
324
print ("1" )
244
325
time .sleep (1 )
245
- exit ()
326
+ quit ()
246
327
#if the `result` has a bool of False, then it will run this part of code. and again will return to menu and exit the program.
247
328
if result == False :
248
329
message_dialog (
@@ -258,14 +339,12 @@ def CNS_EE_HAKED():
258
339
time .sleep (1 )
259
340
print ("1" )
260
341
time .sleep (1 )
261
- exit ()
342
+ quit ()
262
343
#the idea above from smashel!
263
344
264
345
#add passwords here for the logins and name the vars respectivly.
265
346
#
266
- #the website for reference to the password system is https://www.geeksforgeeks.org/npm-bcrypt/
267
- #
268
- #
347
+ #the website for reference to the password system is https://www.geeksforgeeks.org/npm-bcrypt/
269
348
#walkerpasswrd1
270
349
walkerhash = b'$2b$12$M7LXCClyfsnN9SjibtnEmuLEOlR68H2ovjCBA0zcAIBs2RHBzOnFy'
271
350
#frostEEpswrd1
@@ -343,7 +422,7 @@ def frostbytes_EE_entered():
343
422
# Main system loop
344
423
def game_loop ():
345
424
#window_resize_startup()
346
- startup_screen_ASCII ()
425
+ startup_screen_ascii_roll ()
347
426
loading_bars_intro_1 ()
348
427
loading_bars_intro_2 ()
349
428
loading_bars_intro_3 ()
0 commit comments