mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Added password obfuscation while typing
Each character of the password is replaced by a star while typing + Fixed an old typo for "Handshake successfull" (ss -> cc).
This commit is contained in:
parent
f26ff323fd
commit
f7835e7f60
3 changed files with 47 additions and 6 deletions
|
|
@ -157,13 +157,12 @@ namespace MinecraftClient
|
|||
if (Settings.Password == "")
|
||||
{
|
||||
Console.Write(ConsoleIO.basicIO ? "Please type the password for " + Settings.Login + ".\n" : "Password : ");
|
||||
Settings.Password = Console.ReadLine();
|
||||
|
||||
Settings.Password = ConsoleIO.basicIO ? Console.ReadLine() : ConsoleIO.ReadPassword();
|
||||
if (Settings.Password == "") { Settings.Password = "-"; }
|
||||
if (!ConsoleIO.basicIO)
|
||||
{
|
||||
//Hide the password
|
||||
Console.CursorTop--;
|
||||
Console.Write("Password : <******>");
|
||||
//Hide password length
|
||||
Console.CursorTop--; Console.Write("Password : <******>");
|
||||
for (int i = 19; i < Console.BufferWidth; i++) { Console.Write(' '); }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue