Compare commits
No commits in common. "194435e52c28e736043ce601062371dca7efc3c6" and "b3a9d1010bc2854ffdcfaf89a92e5720a8ea2a6a" have entirely different histories.
194435e52c
...
b3a9d1010b
1 changed files with 1 additions and 5 deletions
6
otpish
6
otpish
|
@ -72,11 +72,7 @@ if [ "${COMMAND}" = "get" ]; then
|
||||||
if [ "$(echo ${i} | cut -d'=' -f1)" = "digits" ]; then digits=$(echo ${i} | cut -d'=' -f2); fi
|
if [ "$(echo ${i} | cut -d'=' -f1)" = "digits" ]; then digits=$(echo ${i} | cut -d'=' -f2); fi
|
||||||
if [ "$(echo ${i} | cut -d'=' -f1)" = "period" ]; then period=$(echo ${i} | cut -d'=' -f2); fi
|
if [ "$(echo ${i} | cut -d'=' -f1)" = "period" ]; then period=$(echo ${i} | cut -d'=' -f2); fi
|
||||||
done
|
done
|
||||||
if [ -z ${secret} ]; then
|
oathtool --totp -b -s "${period}s" -d ${digits} ${secret}
|
||||||
echo secret value unset, check otpish dump to make sure you added the uri correctly
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
oathtool --totp -b -s "${period:-30}s" -d ${digits:-6} ${secret}
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue