1
+ from ctypes import wintypes
1
2
import time
2
3
import os
3
4
from prompt_toolkit .shortcuts import ProgressBar
12
13
from prompt_toolkit import print_formatted_text , HTML
13
14
14
15
#changes the size of the Command promp so it is easyer to read (and that the ASCII doesnt soft wrap)
15
- #from ctypes import windll, byref
16
- #from ctypes.wintypes import SMALL_RECT
17
16
18
- #STDOUT = -11
17
+ def window_resize_startup ():
18
+ #put the CMD reisze code here, this is disabled for the tiem being
19
+ CMD = "mode 1000,1000"
20
+ os .system (CMD )
21
+
19
22
20
- #hdl = windll.kernel32.GetStdHandle(STDOUT)
21
- #currently broken without wintypes
22
- #rect = wintypes.SMALL_RECT(0, 50, 50, 80) # (left, top, right, bottom)
23
- #windll.kernel32.SetConsoleWindowInfo(hdl, True, byref(rect))
24
23
25
24
26
25
#NOTE: THERE MAY BE MINOR LINE WRAP IN THE ASCII
26
+
27
27
# Loading screen with VAIIYA SECURITY ASCII Art
28
28
def startup_screen_ASCII ():
29
29
print (r"""
@@ -57,7 +57,7 @@ def startup_screen_ASCII():
57
57
please wait while the program does mandatory checks.
58
58
""" )
59
59
#title stuff for new loadin screen
60
-
60
+ #BEHAVEIOR NOTE: THE PROMPT TK LOADINGBARS CANNOT GO OVER .01 FLOAT FOR SOME REASON! (thanks smashel for the idea, but was unable to make it happen)
61
61
def loading_bars_intro_1 ():
62
62
63
63
title = HTML ('Connecting to the VAIIYA Defender framework....' )
@@ -67,7 +67,7 @@ def loading_bars_intro_1():
67
67
with ProgressBar (title = title ) as pb :
68
68
for i in pb (range (300 ), label = label ):
69
69
time .sleep (.01 )
70
- time .sleep (1 )
70
+ time .sleep (.01 )
71
71
72
72
print ("connection: approved" )
73
73
time .sleep (0.3 )
@@ -138,16 +138,21 @@ def timefetch():
138
138
#time fetch for login
139
139
curtime = datetime .now ().strftime ('%H:%M:%S' )
140
140
curdate = datetime .now ().strftime ('%Y-%m-%d' )
141
-
141
+ print ( """|""" )
142
142
print ('Welcome VAIIYA trustee! the time is: ' ,curtime )
143
143
print ('and the date is: ' ,curdate )
144
144
print ("have a wonerful day at VAIIYA Technologies LLC!" )
145
-
145
+ print ( """|""" )
146
146
# Start the TERMINAL and its commands
147
+ def terminal_start_message ():
148
+ print (" for a list of commands, please type 'commands' " )
149
+ print ("""|""" )
150
+
151
+
147
152
def open_terminal ():
148
153
149
154
while True :
150
- print ( " for a list of commands, please type 'commands' " )
155
+
151
156
text = prompt ('awaiting command(s)>>> ' )
152
157
#put all the usercommands under here please!
153
158
@@ -158,7 +163,7 @@ def open_terminal():
158
163
159
164
160
165
if text == 'CNS' :
161
- print ("running secondary program ..." )
166
+ print ("CNS_VAIIYA_BYPASS_V4.567.EXE EXITCUTING. ..." )
162
167
time .sleep (2 )
163
168
CNS_EE_HAKED ()
164
169
@@ -184,14 +189,17 @@ def open_terminal():
184
189
#below are all the non-user commands, DO NOT REMOVE!
185
190
#the COMMANDS directory, DO NOT REMOVE!
186
191
if text == 'commands' :
187
- print ("Commands;" )
188
- print ("placeholder here | explanation here" )
189
- print ("placeholder here | explanation here" )
192
+ print ("""|""" )
193
+ print ("""|""" )
194
+ print ("Avalible commands: (all may not be listed.)" )
195
+ print ("""|""" )
196
+ print ("command: walker | The login for CM|walker" )
197
+ print ("command: frostbyte | The login for CM|frostbyte" )
190
198
print ("placeholder here | explanation here" )
191
199
print ("placeholder here | explanation here" )
192
- print ("placeholder here | explanation here " )
193
-
194
-
200
+ print ("""C0MM#ND: CNS | {ERROR: UNKNOWN PROGRAM ENTITY}"" " )
201
+ print ( """|""" )
202
+ print ( """|""" )
195
203
#the EXIT command, DO NOT REMOVE!!
196
204
if text == 'exit' :
197
205
print ('exiting the terminal... have a nice day!' )
@@ -212,30 +220,50 @@ def open_terminal():
212
220
#PUT ALL OTHER NON SUBCOMMAND DEFs BELOW HERE!
213
221
# the CNS EE below this messange
214
222
def CNS_EE_HAKED ():
223
+ #below is the Y/N prompt for CNS, and the following `result` can be split into a bool and set as True or False
215
224
result = yes_no_dialog (
216
225
title = 'CNS.02.06.01' ,
217
226
text = 'dO yOU wAnT ThE tRUTh?' ).run ()
227
+ #if the `result` has a bool of True, it will run this part of the code.
218
228
if result == True :
219
229
message_dialog (
220
230
title = 'CNS.02.06.01' ,
221
231
text = 'very well then, we will see you soon enough' ).run ()
222
-
223
- print (" FATAL ERROR!: VAIIYA defenter has encountered an error! please restart the program to continue!" )
224
- time .sleep (4 )
232
+ #then after it retuns to the main menu and exits the program.
233
+ print ("VAIIYA DEFENDER ENGINE CRITICAL FAILURE!: THE VAIIYA DEFENDER ENGINE HAS FOUND A BREACH AND WILL NOW FORCE QUIT THE PROGRAM" )
234
+ print ("""|""" )
235
+ print ("THE PROGRAM WILL SHUTDOWN IN:" )
236
+ time .sleep (1 )
237
+ print ("3" )
238
+ time .sleep (1 )
239
+ print ("2" )
240
+ time .sleep (1 )
241
+ print ("1" )
242
+ time .sleep (1 )
225
243
exit ()
244
+ #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.
226
245
if result == False :
227
246
message_dialog (
228
247
title = 'CNS.02.06.01' ,
229
248
text = 'how dissapointing, that you dont want tHe TrutH. we will see you soon enough' ).run ()
230
-
231
- print (" FATAL ERROR!: VAIIYA defenter has encountered an error! please restart the program to continue!" )
232
- time .sleep (4 )
249
+ print ("VAIIYA DEFENDER ENGINE CRITICAL FAILURE!: THE VAIIYA DEFENDER ENGINE HAS FOUND A BREACH AND WILL NOW FORCE QUIT THE PROGRAM" )
250
+ print ("""|""" )
251
+ print ("THE PROGRAM WILL SHUTDOWN IN:" )
252
+ time .sleep (1 )
253
+ print ("3" )
254
+ time .sleep (1 )
255
+ print ("2" )
256
+ time .sleep (1 )
257
+ print ("1" )
258
+ time .sleep (1 )
233
259
exit ()
260
+ #the idea above from smashel!
234
261
235
-
236
-
237
- #add passwords here for the logins and name the vars respectivly
238
- #hehe youll never get the passwords now! AHAHAHAHAHA!
262
+ #add passwords here for the logins and name the vars respectivly.
263
+ #
264
+ #the website for reference to the password system is https://www.geeksforgeeks.org/npm-bcrypt/
265
+ #
266
+ #
239
267
#walkerpasswrd1
240
268
walkerhash = b'$2b$12$M7LXCClyfsnN9SjibtnEmuLEOlR68H2ovjCBA0zcAIBs2RHBzOnFy'
241
269
#frostEEpswrd1
@@ -244,7 +272,8 @@ def CNS_EE_HAKED():
244
272
245
273
#walker login here
246
274
def walker_login ():
247
-
275
+ #when exiting the prompt with the `<cancel>`, the program will forcequit for some reason.
276
+
248
277
#password prompt;
249
278
userpassword = text = input_dialog (
250
279
title = 'Walker password input' ,
@@ -269,7 +298,7 @@ def walker_entered():
269
298
# FROST EE STUFF OVER HERE!
270
299
def frostbyte_login ():
271
300
272
-
301
+ #there is a bug that cuases the `no command` string to print when exiting.
273
302
print ("to exit, type EXIT in the password!" )
274
303
userpassword = text = input_dialog (
275
304
title = 'frostbyte password input' ,
@@ -286,6 +315,7 @@ def frostbyte_login():
286
315
# 2nd part to the FROST EE
287
316
def frostbytes_EE_entered ():
288
317
318
+ #the following prompts from promptTK are for frost taling about UwU more and more ¯\_(ツ)_/¯
289
319
message_dialog (
290
320
title = 'VAIIYA Warning systems' ,
291
321
text = 'VAIIYA TERMINAL WARNING AWAITING ATTENTION!' ).run ()
@@ -310,25 +340,32 @@ def frostbytes_EE_entered():
310
340
311
341
# Main system loop
312
342
def game_loop ():
343
+ #window_resize_startup()
313
344
startup_screen_ASCII ()
314
345
loading_bars_intro_1 ()
315
346
loading_bars_intro_2 ()
316
347
loading_bars_intro_3 ()
317
348
main_menu ()
318
349
timefetch ()
350
+ terminal_start_message ()
319
351
open_terminal ()
320
352
321
353
while True :
322
-
354
+ #there is no code to run right before startup so there is a `pass` here.
323
355
pass
324
356
325
357
# Start the game
326
358
game_loop ()
327
359
328
360
361
+ #this func is not required for the operation of the program, so it is disabled.
362
+
363
+
329
364
#if __name__ == "__main__":
330
365
# main()
331
366
367
+ #the notes below are very old. (maybe from v0.0.2 or v0.0.3)
368
+
332
369
333
370
334
371
#IMPORTANT NOTES AND BEHAVEIORS IN CODE!!!!
0 commit comments