hotfix
This commit is contained in:
parent
a7ef429fe0
commit
e2a8b0ac1e
@ -9,7 +9,7 @@ OTP=`oathtool -w 4 --now="$DATE" --totp -b $SECRETKEY`
|
|||||||
|
|
||||||
OTPFROMCLIENT=`echo $SMS_1_TEXT | awk '{print $NF}'`
|
OTPFROMCLIENT=`echo $SMS_1_TEXT | awk '{print $NF}'`
|
||||||
CMD=`echo $SMS_1_TEXT | awk '{print tolower($1)}'`
|
CMD=`echo $SMS_1_TEXT | awk '{print tolower($1)}'`
|
||||||
TEXT=`echo $SMS_1_TEXT | awk '{for (i=2; i<NF; i++) print $i}'`
|
TEXT=`echo $SMS_1_TEXT | awk 'BEGIN {ORS=" "} {for (i=2; i<NF; i++) print $i}'`
|
||||||
MATCH=`echo $OTP | grep $OTPFROMCLIENT`
|
MATCH=`echo $OTP | grep $OTPFROMCLIENT`
|
||||||
|
|
||||||
if [[ $SMS_1_NUMBER -eq $PHONENUM ]]; then
|
if [[ $SMS_1_NUMBER -eq $PHONENUM ]]; then
|
||||||
@ -27,11 +27,11 @@ if [[ $SMS_1_NUMBER -eq $PHONENUM ]]; then
|
|||||||
;;
|
;;
|
||||||
cmd)
|
cmd)
|
||||||
HOST=`echo $TEXT | awk '{print $1}'`
|
HOST=`echo $TEXT | awk '{print $1}'`
|
||||||
COMMAND=`echo $TEXT | awk 'BEGIN {ORS=" "} {for (i=2; i<NF; i++) print $i}'`
|
COMMAND=`echo $TEXT | awk 'BEGIN {ORS=" "} {for (i=2; i<=NF; i++) print $i}'`
|
||||||
REPLY=`ssh -oStrictHostKeyChecking=no root@$HOST $COMMAND`
|
REPLY=`ssh -oStrictHostKeyChecking=no root@$HOST $COMMAND`
|
||||||
pxy)
|
pxy)
|
||||||
PHONENUM=`echo $TEXT | awk '{print $1}'`
|
PHONENUM=`echo $TEXT | awk '{print $1}'`
|
||||||
REPLY=`echo $TEXT | awk 'BEGIN {ORS=" "} {for (i=2; i<NF; i++) print $i}'`
|
REPLY=`echo $TEXT | awk 'BEGIN {ORS=" "} {for (i=2; i<=NF; i++) print $i}'`
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
REPLY="Commande inconnu"
|
REPLY="Commande inconnu"
|
||||||
|
Loading…
Reference in New Issue
Block a user