-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsysrestore.py
More file actions
151 lines (141 loc) · 4.12 KB
/
Copy pathsysrestore.py
File metadata and controls
151 lines (141 loc) · 4.12 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
import sys, os, random, time, subprocess
IS_WINDOWS = os.name == "nt"
IS_MAC = sys.platform == "darwin"
def clear_screen():
if IS_WINDOWS:
os.system("cls")
else:
os.system("clear")
def user_choice():
return input("\n>>> ").lower().strip()
def main():
clear_screen()
print("(A≈) System Restore\n"
"=======================\n")
print("\n"
"Would You Like to Reset ArtSystem\n"
"\n"
"1. Yes\n"
"\n"
"2. No\n")
choice = user_choice()
if choice == "1":
restore()
if choice == "2":
sys.exit(1)
def restore():
clear_screen()
print("1 Restore Launcher 2 Reset Users 3 Check Restore\n"
"------------------")
print("\n"
"Restoring Launcher...")
run = open("run.py", "w")
backup = open("data/restore/launcher.py", "r")
run.write("{}".format(restore))
run.close()
clear_screen()
print("✓ Restore Launcher 2 Reset Users 3 Check Restore\n"
"---------------------------------")
print("\n"
"Reseting Users...")
user = open("user/logindata.py", "w")
passw = open("user/loginpass.py", "w")
user.write("USERNAME = 'Unknown'")
passw.write("PASSWORD = 'Unknown'")
user.close()
passw.close()
clear_screen()
print("✓ Restore Launcher ✓ Reset Users 3 Check Restore\n"
"---------------------------------------------------")
print("\n"
"Checking Restore...")
time.sleep(5)
clear_screen()
print("✓ Restore Launcher ✓ Reset Users ✓ Check Restore\n"
"---------------------------------------------------")
print("\n"
"What was the Reason of you Restoring ArtSystem?\n"
"\n"
"1. Virus\n"
"\n"
"2. Modified Code\n"
"\n"
"3. Other\n")
choice = user_choice()
if choice == "1":
virus()
if choice == "2":
mod()
if choice == "3":
other()
def virus():
clear_screen()
print("(A≈) Virus\n"
"==============")
print("\n"
"We care about your Privacy!\n"
"\n"
"Some Viruses that have been created for ArtSystem can\n"
"Destroy ArtSystem Completely or just steal Document data!\n"
"\n"
"Please report them on the ArtSystem Github Page!\n"
"https://github.com/ArtGames101/Aroba\n"
"\n"
"If you did encounter one we will patch it! (Make Sure to Specify What it did!)\n")
input("\n"
"Enter")
done()
def mod():
clear_screen()
print("(A≈) Modified Code/Software\n"
"===============================")
print("\n"
"We At ArtSystem dont mind if you Modify Code as long as\n"
"\n"
"* You know what you are doing\n"
"* You dont cause damage to your ArtSystem\n"
"\n"
"*** If A Module says dont Tamper With dont Modify it! ***\n")
input("\n"
"Enter")
done()
def other():
clear_screen()
print("(A≈) Other Restore Reason\n"
"=============================")
print("\n"
"We Like to hear your Feedback/Suggestions!\n"
"\n"
"Please State the Reason you Restored ArtSystem!")
choice = user_choice()
clear_screen()
print("(A≈) Other Restore Reason\n"
"=============================")
print("\n"
"{}\n"
"Make sure if this is a problem/error to report it!\n".format(choice))
input("\n"
"Enter")
done()
def done():
clear_screen()
print("(A≈) Thanks!\n"
"=============================")
print("\n"
"Your ArtSystem has been restored!\n"
"If Restore does not work copy 'data/restore/launcher.py'\n"
"And replace run with it!\n")
print("\n"
"1. Restore Again\n"
"\n"
"2. Continue to ArtSystem\n"
"\n"
"0. Exit")
choice = user_choice()
if choice == "1":
main()
if choice == "2":
subprocess.call((sys.executable, "run.py"))
if choice == "0":
sys.exit()
main()