cookie dir to env
This commit is contained in:
parent
3f85e76b36
commit
6024a9ca0a
@ -1,6 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source .env # import credentials
|
source .env # import credentials, tg api, cookie path, bml api
|
||||||
mkdir -p ~/.cache/bml-cli/ # make cookie dir
|
|
||||||
|
|
||||||
if [ ! -f delay ] # if delay file missing
|
if [ ! -f delay ] # if delay file missing
|
||||||
then
|
then
|
||||||
@ -9,7 +8,7 @@ fi
|
|||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
LOGIN=$(curl -s -c $COOKIE $BML_URL/login --data-raw username=$BML_USERNAME --data-raw password=${BML_PASSWORD} | jq -r .code) ## attempt to login
|
LOGIN=$(curl -s -c $COOKIE $BML_URL/login --data-raw username=$BML_USERNAME --data-raw password=${BML_PASSWORD} | jq -r .code) # attempt to login and generate cookie
|
||||||
|
|
||||||
if [ "$LOGIN" = "0" ] # if Login success
|
if [ "$LOGIN" = "0" ] # if Login success
|
||||||
then
|
then
|
||||||
|
@ -9,4 +9,5 @@ TG_CHATID='' #Your Telegram chat ID, This could be your user, group, supergroup
|
|||||||
# DO NOT EDIT THESE UNLESS YOU KNOW WHAT YOURE DOING
|
# DO NOT EDIT THESE UNLESS YOU KNOW WHAT YOURE DOING
|
||||||
TG_BOTAPI='https://api.telegram.org/bot'
|
TG_BOTAPI='https://api.telegram.org/bot'
|
||||||
BML_URL='https://www.bankofmaldives.com.mv/internetbanking/api'
|
BML_URL='https://www.bankofmaldives.com.mv/internetbanking/api'
|
||||||
|
mkdir -p ~/.cache/bml-cli/ # make cookie dir
|
||||||
COOKIE=~/.cache/bml-cli/cookie # set cookie dir
|
COOKIE=~/.cache/bml-cli/cookie # set cookie dir
|
||||||
|
Loading…
x
Reference in New Issue
Block a user