basic code
This commit is contained in:
parent
4eec801b0d
commit
5f5b6d7393
28
env.example
Normal file
28
env.example
Normal file
@ -0,0 +1,28 @@
|
||||
# EDIT THESE TO YOUR CONFIG
|
||||
# BML Config
|
||||
# Your BML Username
|
||||
BML_USERNAME=''
|
||||
# Your BML Password
|
||||
BML_PASSWORD=''
|
||||
# Your BML Account ID,NOT to be confused with account number,
|
||||
# read the README.md on how to obtain this.
|
||||
BML_ACCOUNTID=''
|
||||
|
||||
# Delays
|
||||
# Delay in seconds for script to stop if logged in from another device
|
||||
APP_OPEN_DELAY='600'
|
||||
# Delay in seconds for script to check for new transactions
|
||||
NORMAL_DELAY='40'
|
||||
|
||||
# Telegram Config
|
||||
# Your Telegram Bot API Token, Contact @BotFather on Telegram to obtain token
|
||||
TG_BOT_TOKEN=''
|
||||
# Your Telegram chat ID, This could be your user, group, supergroup or channel ID
|
||||
# add "-100" first if supergroup or channel
|
||||
TG_CHATID=''
|
||||
|
||||
# DO NOT EDIT THESE UNLESS YOU KNOW WHAT YOURE DOING
|
||||
COOKIE=.cache/cookie
|
||||
curl='curl'
|
||||
TG_BOTAPI='https://api.telegram.org/bot'
|
||||
BML_URL='https://www.bankofmaldives.com.mv/internetbanking/api'
|
18
get-balance.sh
Normal file
18
get-balance.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
#Import variable
|
||||
source .env
|
||||
|
||||
|
||||
#Login
|
||||
$curl -s -c $COOKIE $BML_URL/login \
|
||||
--data-raw username=$BML_USERNAME \
|
||||
--data-raw password=${BML_PASSWORD}
|
||||
|
||||
# Get profiles and select personal profile
|
||||
PROFILE=$($curl -s -b $COOKIE $BML_URL/profile | jq -r '.payload | .profile | .[] | .profile' | head -n 1)
|
||||
$curl -s -b $COOKIE $BML_URL/profile \
|
||||
--data-raw profile=$PROFILE >> /dev/null
|
||||
|
||||
$curl -s -c $COOKIE $BML_URL/api/dashboard
|
Loading…
x
Reference in New Issue
Block a user