mirror of
https://github.com/octoleo/Purse.git
synced 2025-01-01 05:31:47 +00:00
Add README
This commit is contained in:
parent
c4e87d6958
commit
e5c1bbb492
21
README.md
21
README.md
@ -1,3 +1,22 @@
|
|||||||
# pwd.sh
|
# 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
8
pwd.sh
@ -68,7 +68,7 @@ read_pass () {
|
|||||||
echo "Empty safe, no passwords!"
|
echo "Empty safe, no passwords!"
|
||||||
exit 3
|
exit 3
|
||||||
else
|
else
|
||||||
echo "Enter password for ${safe}."
|
echo "Enter password to unlock ${safe}."
|
||||||
get_pass ; echo
|
get_pass ; echo
|
||||||
decrypt ${password} ${safe}
|
decrypt ${password} ${safe}
|
||||||
fi
|
fi
|
||||||
@ -88,7 +88,7 @@ write_pass () {
|
|||||||
user_pass=$(gen_pass)
|
user_pass=$(gen_pass)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Enter password for ${safe}."
|
echo "Enter password to unlock ${safe}."
|
||||||
get_pass ; echo
|
get_pass ; echo
|
||||||
|
|
||||||
tmp_secret=$(mktemp -q /tmp/pwd.sh.XXXXXX)
|
tmp_secret=$(mktemp -q /tmp/pwd.sh.XXXXXX)
|
||||||
@ -110,9 +110,9 @@ gen_pass () {
|
|||||||
if [ "$pass_length" == "min" ]; then
|
if [ "$pass_length" == "min" ]; then
|
||||||
len=6
|
len=6
|
||||||
elif [ "$pass_length" == "avg" ]; then
|
elif [ "$pass_length" == "avg" ]; then
|
||||||
len=12
|
len=18
|
||||||
else
|
else
|
||||||
len=24
|
len=36
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${gpg} --gen-random -a 0 ${len}
|
${gpg} --gen-random -a 0 ${len}
|
||||||
|
Loading…
Reference in New Issue
Block a user