summaryrefslogtreecommitdiff
path: root/bin/gauth
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2024-10-23 12:02:22 -0500
committerMarc Vertes <mvertes@free.fr>2024-10-23 12:02:22 -0500
commit5e3b62288690c896c38068175f21771c3a989b02 (patch)
tree3be87e9e6bed97a4048ad8a11547720577a00a30 /bin/gauth
parent3894336b98831ddf4667f02392f22ce93f72fa1f (diff)
update
Diffstat (limited to 'bin/gauth')
-rwxr-xr-xbin/gauth5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/gauth b/bin/gauth
index e2291dd..0c80cbe 100755
--- a/bin/gauth
+++ b/bin/gauth
@@ -2,9 +2,10 @@
# Use backup from andOTP
#cat ~/otp_accounts.json |
+#gpg -qd ~/.otp.gpg |
[ "$1" ] && post="grep -i $1" || post=cat
-gpg -qd ~/.otp.gpg |
+cat ~/.otp_accounts.json |
jq -r '.[] | "\(.label) \(.secret) \(.issuer)"' |
while read -r l s i; do
- printf "%-32s %-10s %s\n" "$l" "$i" "$(oathtool --totp -b "$s")"
+ printf "%-32s %-14s %s\n" "$l" "$i" "$(oathtool --totp -b "$s")"
done | $post