Last active
December 20, 2015 21:58
-
-
Save k14i/6201516 to your computer and use it in GitHub Desktop.
You should not save your passwords anywhare and should not forget them! This thesis will be solved only by algorithm.
This file contains 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
#!/usr/bin/env bash | |
DIR=$HOME/etc/get_password | |
. $DIR/get_password_string.txt | |
. $DIR/get_password_cycle.txt | |
ALGORITHM="sha1" # md4, md5, sha, sha1, ripemd160 and so on. | |
count=1 | |
while [ $count -le ${CYCLE} ]; | |
do | |
STR=`echo ${STR} | openssl dgst -$ALGORITHM` | |
count=`expr $count + 1` | |
done | |
#if [ `uname` == "Darwin" ]; then | |
# echo ${STR} | awk '{print $2}' | |
#else | |
# echo ${STR} | |
#fi | |
echo ${STR} | |
exit $? |
This file contains 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
CYCLE=1 # set a numeric (integer) |
This file contains 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
STR="" # put a seed string here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment