summaryrefslogtreecommitdiff
path: root/pass2txt.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pass2txt.sh')
-rwxr-xr-xpass2txt.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/pass2txt.sh b/pass2txt.sh
new file mode 100755
index 0000000..6317feb
--- /dev/null
+++ b/pass2txt.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+#this script will take the passwords from the "pass" databaes (~/.password) and outputs them into a text file
+
+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}
+ echo "" >> ${outfile}
+done
+