Skip to content

Instantly share code, notes, and snippets.

@drewzh
Created December 8, 2011 10:40
Show Gist options
  • Save drewzh/1446681 to your computer and use it in GitHub Desktop.
Save drewzh/1446681 to your computer and use it in GitHub Desktop.
#!/bin/sh
#########################
## PASSWORD GEN SCRIPT ##
## -drewzh.com- ##
#########################
echo "Please enter your master password:"
stty -echo
read -r master
stty echo
echo "Please enter a key (e.g: domain password will be used for):"
read -r key
password=$(echo $master$key | sha1sum | cut -b 1-40)
echo "Your password is:"
echo $password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment