15 lines
306 B
Bash
Executable File
15 lines
306 B
Bash
Executable File
#!/bin/bash
|
|
|
|
read -p "enter a password : " password
|
|
|
|
if [[ -z $password ]] ; then
|
|
echo "you must enter a password"
|
|
exit;
|
|
fi
|
|
|
|
if [[ ${#password} -ge 12 ]] && [[ $password =~ [a-zA-Z] ]] && [[ $password =~ [0-9] ]] && [[ $password =~ [^a-zA-Z0-9] ]]; then
|
|
echo "Strong!!"
|
|
else
|
|
echo "Weak"
|
|
fi
|