Account Number validation
This commit is contained in:
parent
5199e2b285
commit
4ec9ce87b1
@ -21,6 +21,7 @@ if [ "$LOGIN" = "true" ]
|
|||||||
| cut -f1 -d '"')
|
| cut -f1 -d '"')
|
||||||
echo ""
|
echo ""
|
||||||
echo ${green}Welcome ${reset}$NAME
|
echo ${green}Welcome ${reset}$NAME
|
||||||
|
# curl -s -b $COOKIE $BML_URL/userinfo
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
echo "${red}An error occured, Please check Username and Password" 1>&2
|
echo "${red}An error occured, Please check Username and Password" 1>&2
|
||||||
@ -60,10 +61,17 @@ elif [ "$MENU" = "2" ]
|
|||||||
elif [ "$CONTACS" = "2" ]
|
elif [ "$CONTACS" = "2" ]
|
||||||
then
|
then
|
||||||
printf 'Account Number: '
|
printf 'Account Number: '
|
||||||
read -r ACCOUNT_NAME
|
read -r ACCOUNT_NUMBER
|
||||||
|
VALID_NUMBER=$(curl -s -b $COOKIE $BML_URL/validate/account/$ACCOUNT_NUMBER \
|
||||||
|
| jq -r .success)
|
||||||
|
if [ "$VALID_NUMBER" = "true" ]
|
||||||
|
then
|
||||||
printf 'Name: '
|
printf 'Name: '
|
||||||
read -r ACCOUNT_NAME
|
read -r ACCOUNT_NAME
|
||||||
curl -s -b $COOKIE $BML_URL | jq
|
curl -s -b $COOKIE $BML_URL | jq
|
||||||
|
else
|
||||||
|
echo "${red}Invalid Account" 1>&2
|
||||||
|
fi
|
||||||
elif [ "$CONTACS" = "3" ]
|
elif [ "$CONTACS" = "3" ]
|
||||||
then
|
then
|
||||||
echo ""
|
echo ""
|
||||||
@ -82,3 +90,4 @@ elif [ "$MENU" = "5" ]
|
|||||||
else
|
else
|
||||||
echo "${red}There was an error"
|
echo "${red}There was an error"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -9,4 +9,5 @@ curl -s -c $COOKIE $BML_URL/login \
|
|||||||
--data-raw password=$BML_PASSWORD \
|
--data-raw password=$BML_PASSWORD \
|
||||||
--compressed > /dev/null
|
--compressed > /dev/null
|
||||||
curl -s -b $COOKIE $BML_URL/profile > /dev/null
|
curl -s -b $COOKIE $BML_URL/profile > /dev/null
|
||||||
curl -s -b $COOKIE $BML_URL/contacts
|
#curl -s -b $COOKIE $BML_URL/contacts
|
||||||
|
curl -s -b $COOKIE $BML_URL/validate/account/7704265806101
|
||||||
|
Loading…
x
Reference in New Issue
Block a user