#!/usr/local/bin/bash
CHKPARA=0
if [ -n "$1" ]; then
CCounter="$1"
shift
else
CHKPARA=1
fi
if [ -n "$1" ]; then
Seed="$1"
shift
else
CHKPARA=1
fi
if [ -n "$1" ]; then
Pass="$1"
shift
else
CHKPARA=1
fi
if [ -n "$1" ]; then
Mailto="$1"
shift
else
Mailto="ACCOUNT@DOMAIN.NAME"
fi
if [ $CHKPARA -eq 1 ]; then
echo "Usage: $0 CCounter Seed Pass [Mailto]"
echo "Example: $0 496 ma7133 hiugwhig"
exit 1
else
echo "Generate password now."
fi
echo "CCounter Seed "$CCounter" "$Seed
echo "Pass "$Pass
echo "Mailto "$Mailto
echo $Pass | opiekey -n 1 $CCounter $Seed | mail -s OTPKey $Mailto
Sunday, May 22, 2011
產生 OPIE key 的 script
程式 opiekey.sh
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment