diff options
| author | thomas grothe <thomas@debian> | 2023-10-31 08:42:07 -0500 |
|---|---|---|
| committer | thomas grothe <thomas@debian> | 2023-10-31 08:42:07 -0500 |
| commit | b514920271a2a94490ef84f7805a7e31122373b2 (patch) | |
| tree | 5ca79ea52029b507029676cb80823f5299ef9205 /pass2txt.sh | |
| parent | 20ae6cb48ef3ccb80300580b54b7dcc4c7419dc5 (diff) | |
pass to text script
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 |
