add redownloading the loader
All checks were successful
/ Build BaseBand Loader (push) Successful in 1m34s

This commit is contained in:
Daniella / Tove 2024-06-25 11:09:48 +02:00
parent 9ff2b22257
commit bc4fa0e48d
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -92,6 +92,10 @@ public class Loader implements Util {
new File("baseband.db.tmp").deleteOnExit(); new File("baseband.db.tmp").deleteOnExit();
x.finish(); x.finish();
}) })
.option("Redownload", x -> {
x.data.set("redownload", true);
x.finish();
})
.option("Run in debug mode", x -> { .option("Run in debug mode", x -> {
// Broadway-PopBob // Broadway-PopBob
if(Hasher.sha512hex(JOptionPane.showInputDialog("I need to make sure you have permission to do this.")).equals("4d05926f29c573e2759f96958025a0a0f2ff6873270c3528d0066a9b6e29ab81f0c633890ef148a4b3da51e50e2c1b96cf9710b4a393bcf1261d54417e255a5e")) { if(Hasher.sha512hex(JOptionPane.showInputDialog("I need to make sure you have permission to do this.")).equals("4d05926f29c573e2759f96958025a0a0f2ff6873270c3528d0066a9b6e29ab81f0c633890ef148a4b3da51e50e2c1b96cf9710b4a393bcf1261d54417e255a5e")) {
@ -156,7 +160,7 @@ public class Loader implements Util {
RSAKey rsaKey = new RSAKey(inputStream.readString()); //get publickey RSAKey rsaKey = new RSAKey(inputStream.readString()); //get publickey
Key key = new Key(); Key key = new Key();
outputStream.writeString(rsaKey.rsaEnc(key.toString().getBytes(StandardCharsets.ISO_8859_1))); outputStream.writeString(rsaKey.rsaEnc(key.toString().getBytes(StandardCharsets.ISO_8859_1)));
outputStream.writeString(key.encryptString(Tools.mapToString(getData().toMap()))); outputStream.writeString(key.encryptString(Tools.mapToString(getData(options).toMap())));
Response status = Response.values()[inputStream.readInt()]; Response status = Response.values()[inputStream.readInt()];
@ -245,7 +249,7 @@ public class Loader implements Util {
AccessKiller.killReflectionFor(Tweaker.class); AccessKiller.killReflectionFor(Tweaker.class);
} }
private static TCN getData() throws Exception { private static TCN getData(TCN options) throws Exception {
File file = new File("baseband.login"); File file = new File("baseband.login");
Key key = new Key(Hasher.sha256hex(getToken())); //We encrypt using the hwid Key key = new Key(Hasher.sha256hex(getToken())); //We encrypt using the hwid
@ -259,7 +263,7 @@ public class Loader implements Util {
tcn.set("username", key.decryptString(reader.readLine())); tcn.set("username", key.decryptString(reader.readLine()));
tcn.set("password", key.decryptString(reader.readLine())); tcn.set("password", key.decryptString(reader.readLine()));
tcn.set("hardware-id", getToken()); tcn.set("hardware-id", getToken());
tcn.set("commit", GitHash.GIT_HASH); tcn.set("commit", options.getBoolean("redownload") == Boolean.TRUE ? "REDOWNLOAD!" : GitHash.GIT_HASH);
TCN antiDump = new TCN(); TCN antiDump = new TCN();