Zé Loff <zel...@zeloff.org> wrote:

> Not sure how advisable this is, but I'm using a gpg encrypted file,
> which I keep somewhere hidden (just because). Just put them in file
> foo and do 'gpg -e foo' (assuming you've already setup gpg). When you
> need to look something up just do 'gpg -d foo' and the file gets
> decrypted to stdout.

*takes a deep breath*

~/bin/pwsafe
--------------->
#!/bin/sh

SAFE=$HOME/.pwsafe
TMPFILE=`mktemp /tmp/pwsafeXXXXXXXXXX` || exit 1

trap 'rm -P "$TMPFILE"' 0 1 2 15

STTY=`stty -g`
echo -n "Password: "
stty -echo
read PASSWORD
stty "$STTY"

set -e
echo -n "$PASSWORD" | openssl aes-256-cbc -d -in "$SAFE" -out "$TMPFILE" -pass 
stdin
${EDITOR-${VISUAL-vi}} "$TMPFILE"
echo -n "$PASSWORD" | openssl aes-256-cbc -in "$TMPFILE" -out "$SAFE" -pass 
stdin
<---------------

-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

Reply via email to