Add otp helpers
This commit is contained in:
parent
67c8a1d0c4
commit
c63739cb19
2 changed files with 17 additions and 0 deletions
9
bin/pass-otp
Executable file
9
bin/pass-otp
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# TODO: check for pass
|
||||
|
||||
key="$1"; shift
|
||||
args=("$@")
|
||||
|
||||
otp="$(pass "$key" | grep -Pi '^otp.*: ?.*$' | cut -d ':' -f 2 | sed 's/ //g')"
|
||||
simple-otp "$otp"
|
8
bin/simple-otp
Executable file
8
bin/simple-otp
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# TODO: check for oathtool
|
||||
|
||||
key="$1"; shift
|
||||
args=("$@")
|
||||
|
||||
oathtool --totp=sha1 -b "$key" "${args[@]}"
|
Reference in a new issue