blob: 787cc8d1f240f857eb46645440910f357be890bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/bash
#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"
if [[ $1 ]]; then
outfile="$1"
fi
echo "reading from "${passdb}
echo "and writing to "${outfile}
for f in `find ${passdb} | grep \.gpg`; do
#echo $f >> ${outfile}
#pass `echo $f | sed 's/\.gpg//g'` >> ${outfile}
pswd=`gpg --quiet -d ${f}`
echo "${f} : ${pswd}" >> ${outfile}
done
|