pin limited to 4 characters and auto enter
This commit is contained in:
parent
d97634621e
commit
30eaa42d78
6
bml-cli
6
bml-cli
@ -154,7 +154,7 @@ reset_config(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
readpin(){
|
readpin(){
|
||||||
read -s -p 'Enter Pin: ' PIN
|
read -n 4 -s -p 'Enter Pin: ' PIN
|
||||||
echo ""
|
echo ""
|
||||||
CHECK_PIN=$(echo ${BML_USERNAME} | openssl enc -d -des3 -base64 -pass pass:${PIN} -pbkdf2 2>&1 | grep -oE bad)
|
CHECK_PIN=$(echo ${BML_USERNAME} | openssl enc -d -des3 -base64 -pass pass:${PIN} -pbkdf2 2>&1 | grep -oE bad)
|
||||||
if [ "$CHECK_PIN" = "bad bad" ]
|
if [ "$CHECK_PIN" = "bad bad" ]
|
||||||
@ -187,9 +187,9 @@ savepass(){
|
|||||||
read -p 'Do you want to save login? [y/N] ' SAVE_LOGIN
|
read -p 'Do you want to save login? [y/N] ' SAVE_LOGIN
|
||||||
if [ "$SAVE_LOGIN" = "Y" ] || [ "$SAVE_LOGIN" = "y" ]
|
if [ "$SAVE_LOGIN" = "Y" ] || [ "$SAVE_LOGIN" = "y" ]
|
||||||
then
|
then
|
||||||
read -s -p 'Enter New Pin: ' NEW_PIN
|
read -n 4 -s -p 'Enter New Pin: ' NEW_PIN
|
||||||
echo ""
|
echo ""
|
||||||
read -s -p 'Repeat Pin: ' REPEAT_PIN
|
read -n 4 -s -p 'Repeat Pin: ' REPEAT_PIN
|
||||||
if [ "$NEW_PIN" = "$REPEAT_PIN" ]
|
if [ "$NEW_PIN" = "$REPEAT_PIN" ]
|
||||||
then
|
then
|
||||||
echo ""
|
echo ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user