-
Notifications
You must be signed in to change notification settings - Fork 0
/
server-setup.py
44 lines (39 loc) · 1.31 KB
/
server-setup.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
import sys
import os
try:
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives import serialization
from cryptography.fernet import Fernet
except:
print('Error: cryptography not found. Run "pip install cryptography".')
sys.exit()
from threading import Thread
try:
import hashlib
except:
print('Error: hashlib not found. Run "pip install hashlib".')
sys.exit()
try:
import PySide6
except:
print('Error: PySide6 not found. Run "pip install PySide6".')
directory = input('Path to install: ')
def ask_system():
print('Choose your system(1/2):')
print(' [1] - Linux/MacOS')
print(' [2] - Windows')
system = input('> ')
if system == '1':
slash = '/'
elif system == '2':
slash == '\\'
else:
print('Incorrect input! Please, enter 1 or 2.\n')
slash = ask_system()
return slash
slash = ask_system()
os.system(f'curl https://raw.githubusercontent.com/gh0stKn1ght/Abyss/main/server/server.py > {directory}{slash}server.py')
os.system(f'curl https://raw.githubusercontent.com/gh0stKn1ght/Abyss/main/server/reg_user.py > {directory}{slash}reg_user.py')
reg_key = input('Registration key for server: ')
open(f'{directory}{slash}reg_key.txt', 'w').write(reg_key)
print('Successfully installed Abyss server!')