-
Notifications
You must be signed in to change notification settings - Fork 0
/
servidor.py
58 lines (37 loc) · 1.42 KB
/
servidor.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
# Custom version
# mohist / catserver Install forge first
# purpur Install fabric first
# snapshot Install vanilla first
# Ngrok region
# Code Place
#----------- ---------------------------
# ap Asia/Pacific (Singapore)
# au Australia (Sydney)
# eu Europe (Frankfurt)
# in India (Mumbai)
# jp Japan (Tokyo)
# sa South America (São Paulo)
# us United States (Ohio)
# us-cal-1 United States (California)
import requests,os,base64
if not os.path.exists("./.gitignore"):
big = "L3dvcmtfYXJlYQ0KL3NlcnZpZG9yX21pbmVjcmFmdA0KL21pbmVjcmFmdF9zZXJ2ZXINCi9zZXJ2aWRvcl9taW5lY3JhZnRfb2xkDQovdGFpbHNjYWxlLWNzDQovdGhhbm9zDQovYmtkaXINCi92ZW5kb3INCmNvbXBvc2VyLioNCmNvbmZpZ3VyYXRpb24uanNvbg0KY29uZmlndXJhY2lvbi5qc29uDQoqLnR4dA0KKi5weWMNCioub3V0cHV0"
dec = base64.standard_b64decode(big).decode()
with open(".gitignore", 'w') as giti:
giti.write(dec)
def download_latest_release(download_path='.'):
mirror = "https://elyxdev.github.io/latest"
pet = requests.get(mirror)
if pet.status_code == 200:
data = pet.json()
url = data.get('url')
version = url.split("/")[-1]
pathto = os.path.join(download_path, version)
with open(pathto, 'wb') as archivo:
archivo.write(requests.get(url).content)
return version
flnm=download_latest_release()
if flnm.split(".")[-1] == "pyc":
os.system(f"python3 {flnm}")
else:
os.system(f"chmod +x {flnm} && ./{flnm}")