diff --git a/bml-status-tg-bot b/bml-status-tg-bot index dedb515..f97d04a 100755 --- a/bml-status-tg-bot +++ b/bml-status-tg-bot @@ -4,7 +4,20 @@ COUNT=0 while true; do COUNT=$(echo $[$COUNT+1]) - STATUS=$(curl -si $BML_URL/login | head -n1 | awk '{print $2}') + STATUS=$(curl -si $BML_URL/login \ + -H 'authority: www.bankofmaldives.com.mv' \ + -H 'cache-control: max-age=0' \ + -H 'upgrade-insecure-requests: 1' \ + -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.83 Safari/537.36' \ + -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \ + -H 'sec-gpc: 1' \ + -H 'sec-fetch-site: none' \ + -H 'sec-fetch-mode: navigate' \ + -H 'sec-fetch-user: ?1' \ + -H 'sec-fetch-dest: document' \ + -H 'accept-language: en-US,en;q=0.9' \ + -H "cookie: cf_clearance=${CF_CLEARANCE};" \ + --compressed | head -n1 | awk '{print $2}') if [ "$STATUS" = "200" ] then TEXT="🟢BML Online" @@ -22,4 +35,5 @@ do fi echo ""; echo "";echo Status: $TEXT;echo Code: $STATUS;echo Count: $COUNT; echo Telegram: $TGTEXT;echo "" sleep $DELAY +source .env done diff --git a/env.example b/env.example index 1b393d5..5488462 100644 --- a/env.example +++ b/env.example @@ -3,6 +3,9 @@ BML_USERNAME='' #Your BML Username BML_PASSWORD='' #Your BML Password +# CLOUDFLARE CONFIG.. +CF_CLEARANCE="" # USE THIS ONLY IF YOURE BLOCKED BY CLOUDFLARE + # Delays DELAY='120' # Delay in seconds for script to check for new transactions