From 0330d5c0870a1d72b4a8f625b4a13a15db07bfbc Mon Sep 17 00:00:00 2001 From: qo-op Date: Thu, 28 May 2020 20:34:39 +0200 Subject: [PATCH] PHONE control SMS --- g1sms/sms_ASTROPORT.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/g1sms/sms_ASTROPORT.sh b/g1sms/sms_ASTROPORT.sh index dfbc332..9834d76 100755 --- a/g1sms/sms_ASTROPORT.sh +++ b/g1sms/sms_ASTROPORT.sh @@ -44,6 +44,11 @@ for hashfile in /tmp/loveland_entrance/*; do [[ ! -f $hashfile ]] && continue PP=$(cat $hashfile) PHONE=$(echo $PP | cut -d '|' -f 1) + + [[ ! ${#PHONE} -eq 12 ]] && exit 1 + [[ ! ${PHONE:3:1} == "6" && ! ${PHONE:3:1} == "7" ]] && exit 1 + + PARRAIN=$(echo $PP | cut -d '|' -f 2) NAISSANCE=$(echo $PP | cut -d '|' -f 3)