1111import bcrypt
1212from datetime import datetime
1313from prompt_toolkit import print_formatted_text , HTML
14-
14+ import random
1515#changes the size of the Command promp so it is easyer to read (and that the ASCII doesnt soft wrap)
1616
1717def window_resize_startup ():
1818#put the CMD reisze code here, this is disabled for the tiem being
1919 CMD = "mode 1000,1000"
2020 os .system (CMD )
2121
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+ """ )
2257
2358
2459
2560#NOTE: THERE MAY BE MINOR LINE WRAP IN THE ASCII
2661
2762# Loading screen with VAIIYA SECURITY ASCII Art
28- def startup_screen_ASCII ():
63+ def norm_startup_screen_ASCII ():
2964 print (r"""
3065
3166
@@ -34,17 +69,17 @@ def startup_screen_ASCII():
3469 \|||||||||\ \::::::::::\
3570 \|||||||||\ \::::::::::\
3671 \|||||||||\ \::::::::::\
37- \-------\ /--------/ /-------\ \--------\ \--------\ \--------\ /---------/ /------- \
38- \.......\ /......../ /.........\ \........\ \........\ \........\ /........./ /......... \
39- \.......\ /......../ /...........\ \........\ \........\ \........\ /........./ /........... \
40- \.......\ /......../ /.............\ \........\ \........\ \........\ /........./ /............. \
41- \.......\ /......../ /......__.......\ \........\ \........\ \........\ /........./ /............... \
42- \.......\ /......../ /....../ \.......\ \........\ \........\ \........\_/........./ /....... / \......\
43- \.......\ /......../ /....../ \.......\ \........\ \........\ \................../ /....... / \......\
44- \................/ /....../ \.......\ \........\ \........\ \................/ /....... / \......\
45- \............../ /....../ \.......\ \........\ \........\ \............../ /....... / \......\
46- \............/ /....../ \.......\ \........\ \........\ \............/ /....... / \......\
47- \........../ /....../ \.......\ \........\ \........\ \........../ /....... / \......\
72+ \-------\ /--------/ /-------\ \--------\ \--------\ \--------\ /---------/ /------\
73+ \.......\ /......../ /.........\ \........\ \........\ \........\ /........./ /........\
74+ \.......\ /......../ /...........\ \........\ \........\ \........\ /........./ /..........\
75+ \.......\ /......../ /.............\ \........\ \........\ \........\ /........./ /............\
76+ \.......\ /......../ /......__.......\ \........\ \........\ \........\ /........./ /..............\
77+ \.......\ /......../ /....../ \.......\ \........\ \........\ \........\_/........./ /....../ \......\
78+ \.......\ /......../ /....../ \.......\ \........\ \........\ \................../ /....../ \......\
79+ \................/ /....../ \.......\ \........\ \........\ \................/ /....../ \......\
80+ \............../ /....../ \.......\ \........\ \........\ \............../ /....../ \......\
81+ \............/ /....../ \.......\ \........\ \........\ \............/ /....../ \......\
82+ \........../ /....../ \.......\ \........\ \........\ \........../ /....../ \......\
4883 /........./
4984 /........./
5085 /........./
@@ -82,9 +117,24 @@ def loading_bars_intro_2():
82117 for i in pb (range (215 ), label = label ):
83118 time .sleep (.01 )
84119 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!
85137
86- print ("codes found! checking with system.... approved!" )
87- time .sleep (0.2 )
88138
89139def loading_bars_intro_3 ():
90140
@@ -112,22 +162,22 @@ def main_menu():
112162 \|||||||||\ \::::::::::\
113163 \|||||||||\ \::::::::::\
114164 \|||||||||\ \::::::::::\
115- \-------\ /--------/ /-------\ \--------\ \--------\ \--------\ /---------/ /-------\
116- \.......\ /......../ /.........\ \........\ \........\ \........\ /........./ /.........\
117- \.......\ /......../ /...........\ \........\ \........\ \........\ /........./ /...........\
118- \.......\ /......../ /.............\ \........\ \........\ \........\ /........./ /.............\
119- \.......\ /......../ /......__.......\ \........\ \........\ \........\ /........./ /...............\
120- \.......\ /......../ /....../ \.......\ \........\ \........\ \........\_/........./ /......./ \......\
121- \.......\ /......../ /....../ \.......\ \........\ \........\ \................../ /......./ \......\
122- \................/ /....../ \.......\ \........\ \........\ \................/ /......./ \......\
123- \............../ /....../ \.......\ \........\ \........\ \............../ /......./ \......\
124- \............/ /....../ \.......\ \........\ \........\ \............/ /......./ \......\
125- \........../ /....../ \.......\ \........\ \........\ \........../ /......./ \......\
126- /........./
165+ \-------\ /--------/ /------\ \--------\ \--------\ \--------\ /---------/ /-------\
166+ \.......\ /......../ /........\ \........\ \........\ \........\ /........./ /.........\
167+ \.......\ /......../ /..........\ \........\ \........\ \........\ /........./ /...........\
168+ \.......\ /......../ /............\ \........\ \........\ \........\ /........./ /.............\
169+ \.......\ /......../ /......__......\ \........\ \........\ \........\ /........./ /...............\
170+ \.......\ /......../ /....../ \......\ \........\ \........\ \........\_/........./ /......./ \......\
171+ \.......\ /......../ /....../ \......\ \........\ \........\ \................../ /......./ \......\
172+ \................/ /....../ \......\ \........\ \........\ \................/ /......./ \......\
173+ \............../ /....../ \......\ \........\ \........\ \............../ /......./ \......\
174+ \............/ /....../ \......\ \........\ \........\ \............/ /......./ \......\
175+ \........../ /....../ \......\ \........\ \........\ \........../ /......./ \......\
127176 /........./
128177 /........./
129178 /........./
130- /---------/
179+ /........./
180+ /---------/
131181 VAIIYA technologies LLC
132182 Empowering security, one byte at a time.
133183
@@ -141,45 +191,73 @@ def timefetch():
141191 print ("""|""" )
142192 print ('Welcome VAIIYA trustee! the time is: ' ,curtime )
143193 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!" )
145195 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.
147198def terminal_start_message ():
148199 print (" for a list of commands, please type 'commands' " )
149200 print ("""|""" )
150201
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^^^
151206
207+
208+ #Starts the TERMINAL and its commands
152209def open_terminal ():
153210
154211 while True :
155212
156213 text = prompt ('awaiting command(s)>>> ' )
157214#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+
159237
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+
160244
161-
162-
163-
164-
165- if text == 'CNS' :
245+
246+ elif text == 'CNS' :
166247 print ("CNS_VAIIYA_BYPASS_V4.567.EXE EXITCUTING...." )
167248 time .sleep (2 )
168249 CNS_EE_HAKED ()
169-
170- if text == 't342' :
171- print ('heyy thanks for sayin somthin!' )
172- continue
173250
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' :
176254 print ("welcome walker to your login! please wait while your coffee brews......." )
177255 time .sleep (3 )
178256 walker_login ()
179257
180- #BUG: the error "no command" will reply when exiting the FROST EE!
258+ #the `no- command bug has been resolved.`
181259 # FROST EE WIP!!
182- if text == 'frostbyte' :
260+ elif text == 'frostbyte' :
183261 print ("welcome frostbyte to your login! please wait while i startup the supercomputer and freeze these bytes!...." )
184262 time .sleep (3 )
185263 #enters the frostbyte EE
@@ -188,25 +266,28 @@ def open_terminal():
188266
189267#below are all the non-user commands, DO NOT REMOVE!
190268 #the COMMANDS directory, DO NOT REMOVE!
191- if text == 'commands' :
269+ elif text == 'commands' :
192270 print ("""|""" )
193271 print ("""|""" )
194272 print ("Avalible commands: (all may not be listed.)" )
195273 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" )
198276 print ("placeholder here | explanation here" )
199277 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!" )
201283 print ("""|""" )
202284 print ("""|""" )
203-
204285
205286 #the EXIT command, DO NOT REMOVE!!
206287 elif text == 'exit' :
207288 print ('exiting the terminal... have a nice day!' )
208289 time .sleep (0.5 )
209- exit ()
290+ quit ()
210291
211292 #error response
212293 else :
@@ -219,7 +300,7 @@ def open_terminal():
219300
220301
221302
222- #PUT ALL OTHER NON SUBCOMMAND DEFs BELOW HERE!
303+ #PUT ALL FUNC DEFS BELOW HERE!
223304# the CNS EE below this messange
224305def CNS_EE_HAKED ():
225306 #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():
242323 time .sleep (1 )
243324 print ("1" )
244325 time .sleep (1 )
245- exit ()
326+ quit ()
246327 #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.
247328 if result == False :
248329 message_dialog (
@@ -258,14 +339,12 @@ def CNS_EE_HAKED():
258339 time .sleep (1 )
259340 print ("1" )
260341 time .sleep (1 )
261- exit ()
342+ quit ()
262343#the idea above from smashel!
263344
264345#add passwords here for the logins and name the vars respectivly.
265346#
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/
269348#walkerpasswrd1
270349walkerhash = b'$2b$12$M7LXCClyfsnN9SjibtnEmuLEOlR68H2ovjCBA0zcAIBs2RHBzOnFy'
271350#frostEEpswrd1
@@ -343,7 +422,7 @@ def frostbytes_EE_entered():
343422# Main system loop
344423def game_loop ():
345424 #window_resize_startup()
346- startup_screen_ASCII ()
425+ startup_screen_ascii_roll ()
347426 loading_bars_intro_1 ()
348427 loading_bars_intro_2 ()
349428 loading_bars_intro_3 ()
0 commit comments