Created
March 11, 2012 11:42
-
-
Save jhbabon/2016142 to your computer and use it in GitHub Desktop.
passman - Minimal password manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# passman - GPL3 - nibble <develsec.org> 2009 | |
# Minimal password manager | |
# link: http://nibble.develsec.org/hg/toys/file/ddaf55c59fc7/passman | |
PASSFILE=~/.passmandb | |
TMPFILE=~/.passmandb.$$ | |
trap "shred -fuz ${TMPFILE}" 0 2 15 && | |
umask 177 && | |
if [ -e ${PASSFILE} ]; then | |
gpg --no-use-agent -o ${TMPFILE} -d ${PASSFILE} | |
else | |
touch ${TMPFILE} | |
fi && | |
vim -x "+set viminfo=" "+set noswapfile" ${TMPFILE} + && | |
gpg --no-use-agent -a -o ${PASSFILE} -c ${TMPFILE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment