-
Notifications
You must be signed in to change notification settings - Fork 14
/
update.py
53 lines (46 loc) · 1.37 KB
/
update.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
import zipfile
import requests
import io
from src.frontend import *
from src.endpoints import auth, get_hwid
clear()
setTitle("Aurora II Updater")
log("Checking your authorization...")
with open('license.txt','r') as f:
try:
authentication = auth(f.readlines()[0])
except:
authentication = auth(inp('Enter license: '), False)
try:
if authentication['bool'] == False:
fatal("You are not authorized to use this software.")
fatal(f"- > {authentication['answer']}")
log("You can buy a license @ auroratools.shop")
close()
except:
pass
ok("You are authorized to use this program.")
##
log("Downloading the latest version of Aurora...")
try:
data = requests.get("https://api.auroratools.shop/aurora.zip")
except Exception as e:
fatal("There was a problem downloading Aurora!")
hint(e)
log("Please report this in the Discord.")
close()
ok("Successfully downloaded the latest version of Aurora!")
try:
z = zipfile.ZipFile(io.BytesIO(data.content))
log("Extracting...")
z.extractall("Aurora")
z.close()
except Exception as e:
fatal("There was a problem extracting Aurora contents!")
hint(e)
log("Please report this in the Discord.")
close()
ok("Aurora has been sucessfully installed.")
log("You can view it in the Aurora folder that appeared in the current")
log("directory.")
close()