-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtestos.py
68 lines (58 loc) · 2.06 KB
/
testos.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
66
67
68
import time
import os, platform
jls_extract_var = """
████████████████████████████████████
█─▄─▄─█▄─▄▄─█─▄▄▄▄█─▄─▄─█─▄▄─█─▄▄▄▄█
███─████─▄█▀█▄▄▄▄─███─███─██─█▄▄▄▄─█
▀▀▄▄▄▀▀▄▄▄▄▄▀▄▄▄▄▄▀▀▄▄▄▀▀▄▄▄▄▀▄▄▄▄▄▀
"""
print(jls_extract_var)
jls_extract_var = """
[1] Contunie with TestOS setup
[2] I Have Already Done TestOS Setup
"""
print(jls_extract_var)
setup = input(":")
if setup == '1':
name = input(str("Enter your name to display: "))
pas = input(str("Enter your password to login: "))
lines = [name]
if not os.path.exists("user"): # Checks if folder doesn't exist
os.mkdir("user") # Create folder if doesn't exist
with open("user/username.txt", "w") as f:
f.writelines(name)
lines4 = [pas]
with open('user/password.txt', 'w') as f:
f.writelines(pas)
print("TESTOS Setup has been Completed!!!")
time.sleep(1)
if platform.system() == "Darwin":
os.system("open home.py")
elif platform.system() == "Windows":
os.startfile('home.py')
elif platform.system() == "Linux":
os.system("xdg-open home.py")
else:
print("Host OS unsupported.")
exit()
if setup == '2':
login_pass = open('user/password.txt')
login_name = open('user/username.txt')
l_p = login_pass.read()
l_n = login_name.read()
else: # If no input then exit the program
exit()
while True:
login = input(str("Enter your password To " + l_n + ": "))
if login == l_p:
if platform.system() == "Darwin":
os.system("open home.py")
elif platform.system() == "Windows":
os.startfile("home.py")
elif platform.system() == "Linux":
os.system("xdg-open home.py")
else:
print("Host OS unsupported.")
break
else:
print("Wrong password!")