-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartup.py
65 lines (53 loc) · 3.43 KB
/
startup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/python3
import csv
import os
def main():
os.system("clear")
ascii_banner = """
$$$$$$$\
$$ __$$\
$$ | $$ | $$$$$$\ $$\ $$\ $$$$$$\ $$\ $$\ $$$$$$\ $$\ $$\ $$$$$$\ $$$$$$$\
$$ | $$ |$$ __$$\ $$ | $$ |$$ __$$\ $$ | $$ | $$ __$$\\\\$$\ $$ |$$ __$$\ $$ __$$\
$$ | $$ |$$ / $$ | $$ | $$ |$$ / $$ |$$ | $$ | $$$$$$$$ |\$$\$$ / $$$$$$$$ |$$ | $$ |
$$ | $$ |$$ | $$ | $$ | $$ |$$ | $$ |$$ | $$ | $$ ____| \$$$ / $$ ____|$$ | $$ |
$$$$$$$ |\$$$$$$ | \$$$$$$$ |\$$$$$$ |\$$$$$$ | \$$$$$$$\ \$ / \$$$$$$$\ $$ | $$ |
\_______/ \______/ \____$$ | \______/ \______/ \_______| \_/ \_______|\__| \__|
$$\ $$ |
\$$$$$$ |
\______/
$$\ $$\ $$$$\ +--------------------------------------------+
$$ |\__| $$ $$\ + Welcome to the Linux Event! +
$$ |$$\ $$$$$$$\ $$\ $$\ $$\ $$\\\\__/$$ | + Event by Open Source Community - VIT AP +
$$ |$$ |$$ __$$\ $$ | $$ |\$$\ $$ | $$ | + Server provided by expanse.host +
$$ |$$ |$$ | $$ |$$ | $$ | \$$$$ / $$ / +--------------------------------------------+
$$ |$$ |$$ | $$ |$$ | $$ | $$ $$< \__/
$$ |$$ |$$ | $$ |\$$$$$$ |$$ /\$$\ $$\ Event Hosts:
\__|\__|\__| \__| \______/ \__/ \__| \__| Bharath, Himanshu
ASCII art by: patorjk.com
"""
print(ascii_banner)
reg_no = input("Enter your registration number: ")
password = input("Enter your password (last 4 digits of your registration number): ")
with open("registrations.csv", "r") as f:
reader = csv.reader(f)
for row in reader:
if row[0] == reg_no and row[0][-4:] == password:
os.system("clear")
print("Welcome!")
print("You will now be transferred to your own Linux Virtual Machine")
input("Press Enter to continue...")
os.system("docker run -it ghcr.io/osc-vitap/linux-event-vm:latest /bin/bash")
break
else:
print("Invalid credentials!")
input("Press Enter to go to main menu...")
main()
def exitProtection():
try:
main()
except KeyboardInterrupt:
exitProtection()
except EOFError:
exitProtection()
if __name__ == "__main__":
exitProtection()