Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash script to checker credentials

echo -e "Enter username: c"
read -r userlis

echo -e "Enter passphrase: c"
read -r -s passlis

if [[ $userlis = "test" && $passlis = "123" ]] ; then
        echo "logged in."
elif [[ $userlis = "test" && $passlis != "123" ]] ; then
        echo "username is fine. Wrong passphrase"
elif [[ $userlis != "test" && $passlis = "123" ]] ; then
        echo "username is wrong. Passphrase is fine."
else
        echo "You dont belong here."
fi
 
PREVIOUS NEXT
Tagged: #bash #script #checker #credentials
ADD COMMENT
Topic
Name
2+9 =