Skip to content

Commit d1840a6

Browse files
authored
Merge pull request #29 from T342guy/experimental
v8 release pull
2 parents 557098a + 16121a4 commit d1840a6

File tree

1 file changed

+69
-32
lines changed

1 file changed

+69
-32
lines changed

VAIIYA terminal.py

+69-32
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from ctypes import wintypes
12
import time
23
import os
34
from prompt_toolkit.shortcuts import ProgressBar
@@ -12,18 +13,17 @@
1213
from prompt_toolkit import print_formatted_text, HTML
1314

1415
#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
1716

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+
1922

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))
2423

2524

2625
#NOTE: THERE MAY BE MINOR LINE WRAP IN THE ASCII
26+
2727
# Loading screen with VAIIYA SECURITY ASCII Art
2828
def startup_screen_ASCII():
2929
print(r"""
@@ -57,7 +57,7 @@ def startup_screen_ASCII():
5757
please wait while the program does mandatory checks.
5858
""")
5959
#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)
6161
def loading_bars_intro_1():
6262

6363
title = HTML('Connecting to the VAIIYA Defender framework....')
@@ -67,7 +67,7 @@ def loading_bars_intro_1():
6767
with ProgressBar(title=title) as pb:
6868
for i in pb(range(300), label=label):
6969
time.sleep(.01)
70-
time.sleep(1)
70+
time.sleep(.01)
7171

7272
print("connection: approved")
7373
time.sleep(0.3)
@@ -138,16 +138,21 @@ def timefetch():
138138
#time fetch for login
139139
curtime = datetime.now().strftime('%H:%M:%S')
140140
curdate = datetime.now().strftime('%Y-%m-%d')
141-
141+
print("""|""")
142142
print('Welcome VAIIYA trustee! the time is: ',curtime)
143143
print('and the date is: ',curdate)
144144
print("have a wonerful day at VAIIYA Technologies LLC!")
145-
145+
print("""|""")
146146
# 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+
147152
def open_terminal():
148153

149154
while True:
150-
print(" for a list of commands, please type 'commands' ")
155+
151156
text = prompt('awaiting command(s)>>> ')
152157
#put all the usercommands under here please!
153158

@@ -158,7 +163,7 @@ def open_terminal():
158163

159164

160165
if text == 'CNS':
161-
print("running secondary program...")
166+
print("CNS_VAIIYA_BYPASS_V4.567.EXE EXITCUTING....")
162167
time.sleep(2)
163168
CNS_EE_HAKED()
164169

@@ -184,14 +189,17 @@ def open_terminal():
184189
#below are all the non-user commands, DO NOT REMOVE!
185190
#the COMMANDS directory, DO NOT REMOVE!
186191
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")
190198
print("placeholder here | explanation here")
191199
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("""|""")
195203
#the EXIT command, DO NOT REMOVE!!
196204
if text == 'exit':
197205
print('exiting the terminal... have a nice day!')
@@ -212,30 +220,50 @@ def open_terminal():
212220
#PUT ALL OTHER NON SUBCOMMAND DEFs BELOW HERE!
213221
# the CNS EE below this messange
214222
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
215224
result = yes_no_dialog(
216225
title='CNS.02.06.01',
217226
text='dO yOU wAnT ThE tRUTh?').run()
227+
#if the `result` has a bool of True, it will run this part of the code.
218228
if result == True:
219229
message_dialog(
220230
title='CNS.02.06.01',
221231
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)
225243
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.
226245
if result == False:
227246
message_dialog(
228247
title='CNS.02.06.01',
229248
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)
233259
exit()
260+
#the idea above from smashel!
234261

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+
#
239267
#walkerpasswrd1
240268
walkerhash = b'$2b$12$M7LXCClyfsnN9SjibtnEmuLEOlR68H2ovjCBA0zcAIBs2RHBzOnFy'
241269
#frostEEpswrd1
@@ -244,7 +272,8 @@ def CNS_EE_HAKED():
244272

245273
#walker login here
246274
def walker_login():
247-
275+
#when exiting the prompt with the `<cancel>`, the program will forcequit for some reason.
276+
248277
#password prompt;
249278
userpassword = text = input_dialog(
250279
title='Walker password input',
@@ -269,7 +298,7 @@ def walker_entered():
269298
# FROST EE STUFF OVER HERE!
270299
def frostbyte_login():
271300

272-
301+
#there is a bug that cuases the `no command` string to print when exiting.
273302
print("to exit, type EXIT in the password!")
274303
userpassword = text = input_dialog(
275304
title='frostbyte password input',
@@ -286,6 +315,7 @@ def frostbyte_login():
286315
# 2nd part to the FROST EE
287316
def frostbytes_EE_entered():
288317

318+
#the following prompts from promptTK are for frost taling about UwU more and more ¯\_(ツ)_/¯
289319
message_dialog(
290320
title='VAIIYA Warning systems',
291321
text='VAIIYA TERMINAL WARNING AWAITING ATTENTION!').run()
@@ -310,25 +340,32 @@ def frostbytes_EE_entered():
310340

311341
# Main system loop
312342
def game_loop():
343+
#window_resize_startup()
313344
startup_screen_ASCII()
314345
loading_bars_intro_1()
315346
loading_bars_intro_2()
316347
loading_bars_intro_3()
317348
main_menu()
318349
timefetch()
350+
terminal_start_message()
319351
open_terminal()
320352

321353
while True:
322-
354+
#there is no code to run right before startup so there is a `pass` here.
323355
pass
324356

325357
# Start the game
326358
game_loop()
327359

328360

361+
#this func is not required for the operation of the program, so it is disabled.
362+
363+
329364
#if __name__ == "__main__":
330365
# main()
331366

367+
#the notes below are very old. (maybe from v0.0.2 or v0.0.3)
368+
332369

333370

334371
#IMPORTANT NOTES AND BEHAVEIORS IN CODE!!!!

0 commit comments

Comments
 (0)