-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathskidkit.py
121 lines (110 loc) · 5.27 KB
/
skidkit.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
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
import os.path
import requests
import random
from time import sleep
if os.getuid():
print("Script By KrisIsHere | SkidKit Ver. 1.2.4")
exit('\nroot access required\n')
version = "1.2.4"
ascii = ["""\x1b[1;33m
_____ _ _ _ _ ___ _
/ ____| | (_) | | |/ (_) |
| (___ | | ___ __| | ' / _| |_
\___ \| |/ / |/ _` | < | | __|
____) | <| | (_| | . \| | |_
|_____/|_|\_\_|\__,_|_|\_\_|\__|\033[0;37m
""", """\x1b[1;31m
███████ ██ ██ ██ ██████ ██ ██ ██ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
███████ █████ ██ ██ ██ █████ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
███████ ██ ██ ██ ██████ ██ ██ ██ ██
\033[0;37m""", """
\x1b[1;32m.▄▄ · ▄ •▄ ▪ ·▄▄▄▄ ▄ •▄ ▪ ▄▄▄▄▄
▐█ ▀. █▌▄▌▪██ ██▪ ██ █▌▄▌▪██ •██
▄▀▀▀█▄▐▀▀▄·▐█·▐█· ▐█▌▐▀▀▄·▐█· ▐█.▪
▐█▄▪▐█▐█.█▌▐█▌██. ██ ▐█.█▌▐█▌ ▐█▌·
▀▀▀▀ ·▀ ▀▀▀▀▀▀▀▀▀• ·▀ ▀▀▀▀ ▀▀▀ \033[0;37m
""", """\033[0;33m
@@@@@@ @@@ @@@ @@@ @@@@@@@ @@@ @@@ @@@ @@@@@@@
@@@@@@@ @@@ @@@ @@@ @@@@@@@@ @@@ @@@ @@@ @@@@@@@
!@@ @@! !@@ @@! @@! @@@ @@! !@@ @@! @@!
!@! !@! @!! !@! !@! @!@ !@! @!! !@! !@!
!!@@!! @!@@!@! !!@ @!@ !@! @!@@!@! !!@ @!!
!!@!!! !!@!!! !!! !@! !!! !!@!!! !!! !!!
!:! !!: :!! !!: !!: !!! !!: :!! !!: !!:
!:! :!: !:! :!: :!: !:! :!: !:! :!: :!:
:::: :: :: ::: :: :::: :: :: ::: :: ::
:: : : : ::: : :: : : : ::: : :
\033[0;37m
"""]
def setupcheck():
if os.path.isfile("tools/.info/setup.py"):
os.system("python3 tools/main.py")
else:
os.system("clear")
print(random.choice(ascii))
print(os.getcwd())
setup = input(
"It appears as tho you have setup your SkidKit would you like to? \033[0;33m(\033[0;33mY\033[92;40m/\033[0;33mN)\33[37m: ")
if setup in ["Y", "y"]:
os.system("sudo python3 setup.py")
os.system("python3 tools/main.py")
else:
os.system("clear")
print(random.choice(ascii))
sure = input(
"\033[0;37mAre you sure you dont wanna set it up? \033[0;33m(\033[0;33mY\033[92;40m/\033[0;33mN)\33[37m: ")
if sure in ["Y", "y"]:
os.system("python3 tools/main.py")
else:
setupcheck()
def ver_check():
print('\033[38;2;88;159;240mChecking for Updates.....', end='')
ver_url = 'https://raw.githubusercontent.com/KrisIsHere/SkidKit/main/tools/version.txt'
try:
ver_rqst = requests.get(ver_url)
ver_sc = ver_rqst.status_code
if ver_sc == 200:
github_ver = ver_rqst.text
github_ver = github_ver.strip()
if version == github_ver:
print('\n\033[38;2;88;159;240m[\x1b[1;31mUp-To-Date\033[38;2;88;159;240m]' + '\n')
setupcheck()
exit()
else:
print('\n\033[38;2;88;159;240m[\x1b[1;31mAvailable\033[38;2;88;159;240m: \x1b[1;31m{}\033[38;2;88;159;240m'.format(github_ver) + ']' + '\n')
up = input("\033[38;2;88;159;240mWould you like to update? \033[0;33m(\033[0;33mY\033[92;40m/\033[0;33mN)\33[37m: ")
if up in ["y", "Y"]:
os.system("rm -rf tools/.info/tools.py")
path = os.getcwd()
parent = os.path.abspath(os.path.join(path, os.pardir))
os.system("cp -r tools/.info " + parent)
os.system("cp -r tools/update.py " + parent)
os.system("python3 " + parent + "/update.py")
sys.exit()
else:
exit()
else:
print('\033[38;2;88;159;240m[Status\033[38;2;88;159;240m: \x1b[1;31m{} '.format(ver_sc) + '\033[38;2;88;159;240m]' + '\n')
except Exception as e:
print('\n \x1b[1;31mException\033[38;2;88;159;240m:\x1b[1;31m ' + str(e))
exit()
if os.path.isfile("tools/.info/tos_agree.py"):
ver_check()
else:
os.system("mkdir tools/.info")
os.system("clear")
loooop = "true"
while loooop == "true":
print(random.choice(ascii))
tos_1 = input("""You must agree to our terms and conditions first \033[0;33m(\033[0;33mY\033[92;40m/\033[0;33mN)
\033[0;37mPress \033[0;33m'\033[0;33mP\033[0;33m'\033[0;37m to view the terms and conditions\33[37m: """)
if tos_1 in ["Y", "y"]:
loooop = "false"
os.system("touch tools/.info/tos_agree.py")
setupcheck()
if tos_1 in ["N", "n"]:
sys.exit(1)
if tos_1 in ["p", "P"]:
os.system("cat tos.txt")