2021-04-25 14:59:31 +05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source .env
|
|
|
|
|
|
|
|
BML_URL='https://www.bankofmaldives.com.mv/internetbanking/api'
|
|
|
|
COOKIE=/tmp/bmlcookie
|
|
|
|
curl -s -c $COOKIE $BML_URL/login \
|
|
|
|
--data-raw username=$BML_USERNAME \
|
|
|
|
--data-raw password=$BML_PASSWORD \
|
|
|
|
--compressed > /dev/null
|
|
|
|
curl -s -b $COOKIE $BML_URL/profile > /dev/null
|
2021-04-25 15:16:00 +05:00
|
|
|
|
2021-04-28 01:24:02 +05:00
|
|
|
#curl -s -b $COOKIE $BML_URL/contacts | jq -r '["Account Number","Currency","Account Name","Contact Name"], ["==================================================================="], (.["payload"] | .[] | [.account, .currency, .name, .alias]) | @tsv'
|
2021-04-25 15:16:00 +05:00
|
|
|
|
|
|
|
#get this to render nicely in a table, similar to contacts
|
2021-04-25 15:26:51 +05:00
|
|
|
#curl -s -b $COOKIE $BML_URL/dashboard
|
2021-04-25 22:50:50 +05:00
|
|
|
|
2021-04-28 01:24:02 +05:00
|
|
|
curl -s -b $COOKIE $BML_URL/api/validate/account/7701134192101
|