ready for proxy api

This commit is contained in:
Shihaam Abdul Rahman 2022-04-08 14:28:47 +05:00
parent 8e2c6d1983
commit a7bfeaa64f
Signed by: shihaam
GPG Key ID: 16ADCF6871CB2A56
2 changed files with 4 additions and 17 deletions

View File

@ -4,7 +4,7 @@
## Getting started.
### Requirements
`curl` `screen`
`curl` `jq` `screen`
- Install with whatever package manager you use.
- Make SURE they are installed before continuing!
### Clone repo and Configure

View File

@ -4,21 +4,8 @@ while true;
do
source .env
COUNT=$(echo $[$COUNT+1])
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" ]
STATUS=$(curl -si $BML_URL/login | jq .code)
if [ "$STATUS" = "0" ]
then
TEXT="🟢BML Online"
else
@ -29,7 +16,7 @@ source .env
STATUS_OLD=$STATUS
if [ "$COUNT" != "1" ]
then
TGTEXT=$(echo Status: $TEXT%0ACode: HTTP $STATUS | sed "s/ /%20/g")
TGTEXT=$(echo Status: $TEXT | sed "s/ /%20/g")
curl -s $TG_BOTAPI$TG_BOT_TOKEN/sendMessage?chat_id=$TG_CHATID'&'text=${TGTEXT}
fi
fi