initial commit
This commit is contained in:
commit
ca1add249b
25
bashpass.sh
Executable file
25
bashpass.sh
Executable 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
28
functions.sh
Normal 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 "**************************************************"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user