add login option to loader clientboot
This commit is contained in:
parent
a2d40699b1
commit
9736879ad6
1 changed files with 25 additions and 0 deletions
|
@ -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 -> {
|
||||||
|
|
Loading…
Add table
Reference in a new issue