1
0
mirror of https://github.com/octoleo/Purse.git synced 2024-12-29 12:32:39 +00:00

Add README

This commit is contained in:
drduh 2015-07-01 22:11:49 -04:00
parent c4e87d6958
commit e5c1bbb492
2 changed files with 24 additions and 5 deletions

View File

@ -1,3 +1,22 @@
# pwd.sh
GnuPG wrapper for password management
GnuPG wrapper for password management.
This script uses GPG to manage an encrypted text file containing passwords.
# Requirements
Requires `gpg`. Install with `brew install gpg` or `apt-get install gnupg` or build and install it from [source](https://www.gnupg.org/download/index.html).
# Installation
git clone https://github.com/drduh/pwd.sh && cd pwd.sh
# Use
Run the script with `./pwd.sh`
Type `w` to create a password. Will update existing password with same Username/ID.
Type `r` to print stored passwords. Can be piped to `grep` and `pbcopy` or `xsel`, for example.
To reset/erase keys and passwords, `rm pwd.sh.*`.

8
pwd.sh
View File

@ -68,7 +68,7 @@ read_pass () {
echo "Empty safe, no passwords!"
exit 3
else
echo "Enter password for ${safe}."
echo "Enter password to unlock ${safe}."
get_pass ; echo
decrypt ${password} ${safe}
fi
@ -88,7 +88,7 @@ write_pass () {
user_pass=$(gen_pass)
fi
echo "Enter password for ${safe}."
echo "Enter password to unlock ${safe}."
get_pass ; echo
tmp_secret=$(mktemp -q /tmp/pwd.sh.XXXXXX)
@ -110,9 +110,9 @@ gen_pass () {
if [ "$pass_length" == "min" ]; then
len=6
elif [ "$pass_length" == "avg" ]; then
len=12
len=18
else
len=24
len=36
fi
${gpg} --gen-random -a 0 ${len}