From cdb40efea81e2250d6248d292008eeb2407d8cc9 Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Sat, 24 Apr 2021 00:17:49 +0500 Subject: [PATCH] bml-bash --- bml-bash/bml.sh | 32 ++++++++++++++++++++++++++++++++ bml-bash/bml.sh.save | 20 ++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100755 bml-bash/bml.sh create mode 100755 bml-bash/bml.sh.save diff --git a/bml-bash/bml.sh b/bml-bash/bml.sh new file mode 100755 index 0000000..56604cc --- /dev/null +++ b/bml-bash/bml.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +source .env + +BML_URL='https://www.bankofmaldives.com.mv/internetbanking/api' + +curl -s -c /tmp/bmlcookie $BML_URL/login \ + --data-raw username=$BML_USERNAME \ + --data-raw password=$BML_PASSWORD \ + --compressed > /dev/null +echo "Menu" +echo "" +echo "1 - Accounts" +echo "2 - Contacts" +echo "3 - Activities" +echo "4 - Services" +echo "" +printf 'Please Input: ' +read -r INPUT1 + + +if [ "$INPUT1" = "1" ] + then + curl -s -c /tmp/bmlcookie $BML_URL/dashboard | jq +elif [ "$INPUT1" = "2" ] + then + curl -s -b /tmp/bml/cookie $BML_URL/contacts | jq +else + echo "There was an error" +fi + +#curl -s -b /tmp/bmlcookie $BML_URL/contacts | jq diff --git a/bml-bash/bml.sh.save b/bml-bash/bml.sh.save new file mode 100755 index 0000000..df3606b --- /dev/null +++ b/bml-bash/bml.sh.save @@ -0,0 +1,20 @@ +#!/bin/bash + +source .env + +BML_URL='https://www.bankofmaldives.com.mv/internetbanking/api' + +curl -s -c /tmp/bmlcookie $BML_URL/login \ + --data-raw username=$BML_USERNAME \ + --data-raw password=$BML_PASSWORD \ + --compressed + +curl -s -b /tmp/bmlcookie $BML_URL/profile + + + + + + + +