From 30eaa42d78b12cf59ebe859f3ecf3fc16aa5ee40 Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Tue, 25 May 2021 23:32:39 +0500 Subject: [PATCH] pin limited to 4 characters and auto enter --- bml-cli | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bml-cli b/bml-cli index 765471c..dbff77f 100755 --- a/bml-cli +++ b/bml-cli @@ -154,7 +154,7 @@ reset_config(){ fi } readpin(){ - read -s -p 'Enter Pin: ' PIN + read -n 4 -s -p 'Enter Pin: ' PIN echo "" CHECK_PIN=$(echo ${BML_USERNAME} | openssl enc -d -des3 -base64 -pass pass:${PIN} -pbkdf2 2>&1 | grep -oE bad) if [ "$CHECK_PIN" = "bad bad" ] @@ -187,9 +187,9 @@ savepass(){ read -p 'Do you want to save login? [y/N] ' SAVE_LOGIN if [ "$SAVE_LOGIN" = "Y" ] || [ "$SAVE_LOGIN" = "y" ] then - read -s -p 'Enter New Pin: ' NEW_PIN + read -n 4 -s -p 'Enter New Pin: ' NEW_PIN echo "" - read -s -p 'Repeat Pin: ' REPEAT_PIN + read -n 4 -s -p 'Repeat Pin: ' REPEAT_PIN if [ "$NEW_PIN" = "$REPEAT_PIN" ] then echo "" @@ -766,7 +766,7 @@ init_login(){ display_banner && check_connection #& animate "Checking Internet Connection" source $CONFIG source $CREDENTIALS -display_banner && os_detect # & animate "Detecting Operating System" +display_banner && os_detect #& animate "Detecting Operating System" display_banner && init_login userinfo display_banner && display_welcome && display_userinfo && main_menu