From b514920271a2a94490ef84f7805a7e31122373b2 Mon Sep 17 00:00:00 2001 From: thomas grothe Date: Tue, 31 Oct 2023 08:42:07 -0500 Subject: pass to text script --- pass2txt.sh | 10 ++++++---- 1 file 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 -- cgit v1.2.3