In a homework, there is exercice when I have a script that is used to search a password.
One of the questions is if is possible to make it "more inteligent", and I'm stuck on it.
#!/bin/bash space1="a b c d e f g h i j k l m n o p q r s t u v w x y z" if [ $# -le 1 ] then echo "Ussage: " $0 SALT PASSWORD_CODED exit fi for i in $space1 do for j in $space1 do for k in $space1 do variable=$(openssl passwd -crypt -salt "$1" "$i$j$k") if [ "$variable" = $2 ] then echo password found: $i$j$k exit fi done done done
DISCLAIMER: This is homework.
If is possible I prefer only a clue to help me to discover the answer correct. Not the answer itself. I promise to put the result when I get the answer for myself.