Commit 9180fb3cd7b8

Vincent Demeester <vincent@sbr.pm>
2019-06-25 15:42:59
Add authkey, pinauth and vpnpass
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent e464c7a
Changed files (3)
pkgs/scripts/bin/authkey
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+set -e
+oathtool --hotp $(cat ~/.oath/key) -c $([ ! -f ~/.oath/counter ] && echo -n 0 > ~/.oath/counter || echo -n $(($(cat ~/.oath/counter)+1)) > ~/.oath/counter; cat ~/.oath/counter)
\ No newline at end of file
pkgs/scripts/bin/pinauth
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+set -e
+[ ! -r ~/.oath/pin ] && echo "No PIN stored." || echo "$(cat ~/.oath/pin)$(authkey)"
\ No newline at end of file
pkgs/scripts/bin/vpnpass
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+set -e
+key=$(authkey)
+echo "${key}" | pbcopy
\ No newline at end of file