initial commit

This commit is contained in:
silvernode 2015-06-01 00:41:02 -05:00
commit ca1add249b
2 changed files with 53 additions and 0 deletions

25
bashpass.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
source functions.sh
case "$1" in
-s | --sha ) usingSHA
;;
-o | --openssl ) usingOPENSSL
;;
-l | --lefthand ) leftHAND
;;
*) echo
echo "BASH PASS HELP"
echo
echo "-s | --sha SHA the date and print 32 character pass"
echo
echo "-o | --openssl 32 character password using openssl"
echo
echo "-l | --lefthand 8 character password for left hand"
;;
esac

28
functions.sh Normal file
View File

@ -0,0 +1,28 @@
#!/bin/bash
usingSHA(){
#hashes date with SHA
echo
echo "32 character password generated using SHA256 with date"
echo "***************************************************"
date +%s | sha256sum | base64 | head -c 32 ; echo
echo "***************************************************"
}
usingOPENSSL(){
echo
echo "32 character password generated using openssl"
echo "**************************************************"
openssl rand -base64 32
echo "**************************************************"
}
leftHAND(){
echo
echo "8 character password generated using /dev/urandom"
echo "Meant to type with left hand"
echo "**************************************************"
</dev/urandom tr -dc '12345!@#$%qwertQWERTasdfgASDFGzxcvbZXCVB' | head -c8; echo ""
echo "**************************************************"
}