loader update
All checks were successful
/ Build BaseBand Loader (push) Successful in 1m12s

This commit is contained in:
Jess H 2024-06-15 00:13:22 +01:00
parent b2d26f4892
commit ac2093fadb
Signed by: UnixSystemV
GPG key ID: 9B21C50B68D67F19

View file

@ -39,7 +39,7 @@ public class Loader implements Util {
public static Class<?> baseBandClass;
public enum Response {
OK("Ok."),
OK("OK."),
FORBIDDEN("Request Forbidden."),
OUTDATED("Your Loader is Outdated."),
BANNED("Account Banned."),
@ -56,8 +56,6 @@ public class Loader implements Util {
}
}
private static final SystemInfo systemInfo = new SystemInfo();
private static CustomClassLoader classLoader;
public static void run() {
@ -74,10 +72,8 @@ public class Loader implements Util {
Response status = Response.values()[inputStream.readInt()];
LOGGER.info(status.name);
if(status == Response.OUTDATED) {
LOGGER.info("BaseBand is downloading an update.");
LOGGER.info("BaseBand is downloading a significant update.");
RawKey rk = new RawKey(key.toBytes());
ZipOutputStream out = new ZipOutputStream(new FileOutputStream(HTTPUtils.decodeUTF8(Loader.class.getProtectionDomain().getCodeSource().getLocation().getFile())));
int n = inputStream.readInt();
@ -92,6 +88,7 @@ public class Loader implements Util {
exit();
}
else if(status == Response.OK) {
LOGGER.info(status.name);
try {
TCN clientData = TCN.readMap(Tools.stringToMap(key.decryptString(inputStream.readString())));
@ -169,6 +166,7 @@ public class Loader implements Util {
private static String getToken() {
SystemInfo systemInfo = new SystemInfo();
String string = //this is intellij's fault I wanted a string-builder
Arrays.stream(systemInfo.getHardware().getProcessors()).map(Processor::getIdentifier).collect(Collectors.joining(";;")) +
systemInfo.getOperatingSystem().toString();