From 9736879ad606ba3439f316c61aa14b7500b4147e Mon Sep 17 00:00:00 2001 From: TudbuT Date: Wed, 31 Jul 2024 14:18:26 +0200 Subject: [PATCH] add login option to loader clientboot --- .../java/de/com/baseband/launcher/Loader.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Loader/src/main/java/de/com/baseband/launcher/Loader.java b/Loader/src/main/java/de/com/baseband/launcher/Loader.java index 281b359..e963cb5 100644 --- a/Loader/src/main/java/de/com/baseband/launcher/Loader.java +++ b/Loader/src/main/java/de/com/baseband/launcher/Loader.java @@ -153,6 +153,31 @@ public class Loader implements Util { throw new RuntimeException(e); } }).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() .label("Configuration:") .option("Configure BaseBand", x -> {