Created
October 31, 2023 11:47
-
-
Save andyone/f4b38951c44e8705b3a3a3faf94c121c to your computer and use it in GitHub Desktop.
mkcryptpasswd recipe with problems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Bibop recipe for MkCryptPasswd | |
| # See more: https://kaos.sh/bibop | |
| pkg mkcryptpasswd | |
| fast-finish yes | |
| var password MyPassword1234 | |
| var salt SALT1234 | |
| var salt_length 9 | |
| command "mkcryptpasswd -s" "Generate basic hash for password" | |
| expect "Please enter the password" | |
| print "{password}" | |
| expect "Hash: " | |
| exit 0 | |
| command "mkcryptpasswd -s -sa {salt}" "Generate hash for password with predefined salt" | |
| expect "Please enter the password" | |
| print "{password}" | |
| expect "$6${salt}$lTxNu4.6r/j81sirgJ.s9ai8AA3tJdp67XBWLFiE10tIharVYtzRJ9eJ9YEtQsiLzVtg94GrXAYjf40pWEEg7/" | |
| exit 0 | |
| command "mkcryptpasswd -s -sa {salt} -1" "Generate MD5 hash for password with predefined salt" | |
| expect "Please enter the password" | |
| print "{password}" | |
| expect "$1${salt}$zIPLJYODoLlesdP3bf95S1" | |
| exit 0 | |
| command "mkcryptpasswd -s -sa {salt} -5" "Generate SHA256 hash for password with predefined salt" | |
| expect "Please enter the password" | |
| print "{password}%" | |
| expect "$5${salt}$HOV.9Dkp4HSDzcfizNDG7x5ST4e74zcezvCJ8BWHuK8" | |
| exit 0 | |
| command "mkcryptpasswd -s -S" "Return error if password is too weak" | |
| expect "Please enter the password" | |
| print "password" | |
| expect "Password is too weak: it is based on a dictionary word" | |
| print "password" | |
| expect "Password is too weak: it is based on a dictionary word" | |
| print "password" | |
| expect "Password is too weak: it is based on a dictionary word" | |
| !exit 0 | |
| command "mkcryptpasswd --abcd" "Return error about unsupported argument" | |
| expect "Error! You have used unsupported argument --abcd. Please check command syntax." | |
| !exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment