-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall.py
More file actions
126 lines (103 loc) · 4.77 KB
/
install.py
File metadata and controls
126 lines (103 loc) · 4.77 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
import os
import getpass
import time
def Install():
print('\n[*] LinWin Http Server Dir: /usr/www/html\n')
print('[!] LinWin Http Installer Will Overwrite writes to /usr/LinWinHttp.So you need save the important file in others')
a = input('\n[?] LinWin Http Server Will Install In: /usr/LinWinHttp/ : [Y/N]')
if a == "n" or a == "N":
exit()
else:
def a():
if os.path.exists("/usr/LinWinHttp/") == True:
os.mkdir("/usr/LinWinHttp/openlinwin-backup")
os.system("mv /usr/LinWinHttp/config/* /usr/openlinwin-backup/config")
os.system('rm -fr /usr/LinWinHttp')
os.system('mkdir /usr/LinWinHttp')
os.system('mkdir /usr/www')
os.system('mkdir /usr/www/html')
os.system('cp -rf ./* /usr/LinWinHttp/')
time.sleep(0.1)
os.system('chmod +x /usr/LinWinHttp/Sevice/shell/*')
if os.path.exists("/usr/www/html/index.html") == False:
os.system('cp /usr/LinWinHttp/default/page/index.html /usr/www/html')
os.system('chmod 777 /usr/www/html')
os.system('cp -f Sevice/systemd/linwinhttp.service /etc/systemd/system/')
os.system('chmod +x /usr/LinWinHttp/* -R')
os.system('cd /usr/LinWinHttp/JRE && tar -xvf openJDK8.tar.xz')
os.system('chmod +x /usr/LinWinHttp/sys/start_linwinhttp')
#os.system('/usr/LinWinHttp/sys/start_linwinhttp')
os.system("chmod +x /usr/LinWinHttp/com.linwinMultiServer.package/build.sh")
os.system('cp /usr/LinWinHttp/sys/linwinhttp /bin/')
os.system('cp /usr/LinWinHttp/sys/linwinboot /bin/')
os.system('cp /usr/LinWinHttp/sys/linwinreboot /bin/')
os.system('chmod +x /bin/linwinboot && chmod +x /bin/linwinreboot/')
os.system('chmod +x /bin/linwinhttp')
os.system('cp -f /usr/LinWinHttp/Sevice/desktop/linwinhttp.desktop /usr/share/applications')
os.system('cp /usr/LinWinHttp/sys/linwindoc /bin/')
os.system('chmod +x /bin/linwindoc')
os.system('cp /usr/LinWinHttp/sys/status/linwinstatus /bin/')
os.system('chmod +x /bin/linwinstatus')
os.system('cp /usr/LinWinHttp/sys/fastserver/fastserver /bin/ && chmod +x /bin/fastserver')
os.system('cp /usr/LinWinHttp/sys/linwinreload /bin/ && chmod +x /bin/linwinreload')
os.system('cp /usr/LinWinHttp/sys/linwindoc /bin/ && chmod +x /bin/linwindoc')
os.system('chmod 777 /usr/LinWinHttp/* -R')
os.system("cp /usr/LinWinHttp/sys/linwinMulti /bin/")
os.system("chmod +x /bin/linwinMulti")
os.system("cp /usr/LinWinHttp/sys/linwinmulti /bin/")
os.system("chmod +x /bin/linwinmulti")
os.system('cp /usr/LinWinHttp/sys/wsattacker /bin/ && chmod +x /bin/wsattacker')
print('[!] Finish Install!Install Path: /usr/LinWinHttp/')
time.sleep(0.1)
os.system("linwinMulti")
print('Install ... ...')
if os.path.exists("/usr/LinWinHttp/") and os.path.isdir("/usr/LinWinHttp/"):
a()
return True
else:
os.mkdir('/usr/LinWinHttp/')
a()
return True
def main():
user = getpass.getuser()
print("User Now: "+user)
if user != "root":
print('[ERR]Must Be RUn As Root')
exit()
os.system("clear")
print(""" _
_ _ _ | |
___ _ __ ___ _ __ | | (_)_ ____ _(_)_ __ | |
/ _ \| '_ \ / _ \ '_ \| | | | '_ \ \ /\ / / | '_ \ | |
| (_) | |_) | __/ | | | |___| | | | \ V V /| | | | | | |
\___/| .__/ \___|_| |_|_____|_|_| |_|\_/\_/ |_|_| |_| |_|
|_|
[*] LinWinCloud Teams,UChat Teams,Yinghuo Teams.
[*] For Linux 2023
""")
print(" 1. Install LinWin Http Server (input '1')")
print(" 2. Read Agreement Before Install LinWin Http Server (input '2')")
print(" 3. View This Version")
print(" 4. Exit installer (input 'exit')")
print("")
def console():
options = input(" LinWin Http Server Installer_> ")
if options == "1":
Install()
return True
if options == "2":
os.system('cat ./default/agreement/agreement.txt')
console()
return True
if options == "3":
os.system("cat ./config/Version.txt")
console()
return True
if options == "exit":
print('Bye!')
exit()
else:
main()
return True
console()
main()