add login option to loader clientboot
All checks were successful
/ Build BaseBand Loader (push) Successful in 2m48s
/ Build BaseBand DSM & Broadway (push) Successful in 2m49s
/ Build BaseBand Server (push) Successful in 2m7s

This commit is contained in:
Daniella / Tove 2024-07-31 14:18:26 +02:00
parent a2d40699b1
commit 9736879ad6
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -153,6 +153,31 @@ public class Loader implements Util {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
}).start()) }).start())
.option("Log in to BaseBand", x -> {
try {
String username = JOptionPane.showInputDialog("Username");
String password = JOptionPane.showInputDialog("Password");
Key k = new Key(Hasher.sha256hex(getToken()));
FileOutputStream fos = new FileOutputStream("baseband.login");
PrintWriter writer = new PrintWriter(fos);
writer.println(k.encryptString(Hasher.sha512hex(k.toString())));
writer.println(k.encryptString(username));
writer.println(k.encryptString(password));
writer.println(k.encryptString("LOADER:REWRITE"));
writer.flush();
fos.flush();
writer.close();
fos.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
x.focus();
})
.spacer() .spacer()
.label("Configuration:") .label("Configuration:")
.option("Configure BaseBand", x -> { .option("Configure BaseBand", x -> {