diff options
Diffstat (limited to 'pass2txt.sh')
| -rwxr-xr-x | pass2txt.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pass2txt.sh b/pass2txt.sh index 6317feb..1b51f25 100755 --- a/pass2txt.sh +++ b/pass2txt.sh @@ -1,6 +1,7 @@ #!/bin/bash -#this script will take the passwords from the "pass" databaes (~/.password) and outputs them into a text file +#this script takes the passwords from the "pass" database (~/.password) and outputs them into a text file +#yes this writes passwords to plaintext so only use if you know what you're doing passdb=`realpath ~/.password-store/` outfile="./passwords-in-plaintext.txt" @@ -12,8 +13,9 @@ echo "and writing to "${outfile} for f in `find ${passdb} | grep \.gpg`; do - echo $f >> ${outfile} - pass `echo $f | sed 's/\.gpg//g'` >> ${outfile} - echo "" >> ${outfile} + #echo $f >> ${outfile} + #pass `echo $f | sed 's/\.gpg//g'` >> ${outfile} + pswd=`gpg --quiet -d ${f} >> ${outfile} ` + echo "${f} : ${pswd}" >> ${outfile} done |
