anti-bot antibot
This commit is contained in:
parent
096d7ff627
commit
07e683e10a
@ -10,13 +10,13 @@ fi
|
||||
}
|
||||
|
||||
login(){
|
||||
curl -s -c $COOKIE $BML_URL/login --data-raw username=$BML_USERNAME --data-raw password=${BML_PASSWORD} # attempt to login and generate cookie
|
||||
PROFILE=$(curl -s -b $COOKIE $BML_URL/profile | jq -r '.payload | .profile | .[] | .profile' | head -n 1) ; echo $PROFILE # get Personal Profile
|
||||
curl -s -b $COOKIE $BML_URL/profile --data-raw profile=$PROFILE # select Personal Profile
|
||||
$curl -s -c $COOKIE $BML_URL/login --data-raw username=$BML_USERNAME --data-raw password=${BML_PASSWORD} # attempt to login and generate cookie
|
||||
PROFILE=$($curl -s -b $COOKIE $BML_URL/profile | jq -r '.payload | .profile | .[] | .profile' | head -n 1) ; echo $PROFILE # get Personal Profile
|
||||
$curl -s -b $COOKIE $BML_URL/profile --data-raw profile=$PROFILE # select Personal Profile
|
||||
}
|
||||
|
||||
getaccountdetails(){
|
||||
REQACCOUNTDETAILS=$(curl -s -b $COOKIE $BML_URL/account/$BML_ACCOUNTID | jq -r .payload)
|
||||
REQACCOUNTDETAILS=$($curl -s -b $COOKIE $BML_URL/account/$BML_ACCOUNTID | jq -r .payload)
|
||||
ACCOUNTTYPE=$(echo $REQACCOUNTDETAILS | jq -r .product)
|
||||
ACCOUNTNUMBER=$(echo $REQACCOUNTDETAILS | jq -r .accountNumber)
|
||||
CURRENCY=$(echo $REQACCOUNTDETAILS | jq -r .currency)
|
||||
@ -24,18 +24,18 @@ CURRENCY=$(echo $REQACCOUNTDETAILS | jq -r .currency)
|
||||
|
||||
send_tg(){
|
||||
TGTEXT=$(echo $DESCRIPTION%0A$FROMTOAT: $ENTITY%0A$CURRENCY: $AMOUNT | sed "s/ /%20/g") ; echo $TGTEXT # format text for telegram
|
||||
curl -s $TG_BOTAPI$TG_BOT_TOKEN/sendMessage?chat_id=$TG_CHATID'&'text=$TGTEXT #send to telegram
|
||||
$curl -s $TG_BOTAPI$TG_BOT_TOKEN/sendMessage?chat_id=$TG_CHATID'&'text=$TGTEXT #send to telegram
|
||||
echo "Next check in $DELAY seconds"
|
||||
}
|
||||
|
||||
req_history(){
|
||||
REQ_HISTORY=$(curl -s -b $COOKIE $BML_URL/account/$BML_ACCOUNTID/history/today) ; echo $REQ_HISTORY
|
||||
REQ_HISTORY=$($curl -s -b $COOKIE $BML_URL/account/$BML_ACCOUNTID/history/today) ; echo $REQ_HISTORY
|
||||
LOGIN_STATUS=$(echo $REQ_HISTORY | jq -r .success) ; echo $LOGIN_STATUS
|
||||
}
|
||||
|
||||
check_diff(){
|
||||
CHECKDIFF1=$(echo $HISTORY | wc -c) ; echo $CHECKDIFF1 # check intial and previous history
|
||||
#HISTORY=$(curl -s -b $COOKIE $BML_URL/account/$BML_ACCOUNTID/history/today | jq -r '.payload | .history | .[]') ; echo $HISTORY # request history
|
||||
#HISTORY=$($curl -s -b $COOKIE $BML_URL/account/$BML_ACCOUNTID/history/today | jq -r '.payload | .history | .[]') ; echo $HISTORY # request history
|
||||
HISTORY=$(echo $REQ_HISTORY | jq -r '.payload | .history | .[]') ; echo $HISTORY
|
||||
CHECKDIFF2=$(echo $HISTORY | wc -c) ; echo $CHECKDIFF2 # check new history
|
||||
}
|
||||
@ -72,7 +72,7 @@ then
|
||||
if [ "$CHECKDIFF2" = "1" ]
|
||||
then
|
||||
echo "=============" ; echo NEW DAY ; echo "============="
|
||||
# curl -s $TG_BOTAPI$TG_BOT_TOKEN/sendMessage?chat_id=$TG_CHATID'&'text=GO%20TO%20SLEEP%0AITS%0000
|
||||
# $curl -s $TG_BOTAPI$TG_BOT_TOKEN/sendMessage?chat_id=$TG_CHATID'&'text=GO%20TO%20SLEEP%0AITS%0000
|
||||
else
|
||||
echo $HISTORY | jq
|
||||
DESCRIPTION=$(echo $HISTORY | jq -r .description | head -n1) ; echo $DESCRIPTION # get last trascation description
|
||||
|
@ -14,5 +14,6 @@ TG_CHATID='' #Your Telegram chat ID, This could be your user, group, supergrou
|
||||
|
||||
# DO NOT EDIT THESE UNLESS YOU KNOW WHAT YOURE DOING
|
||||
COOKIE=.cache/cookie
|
||||
curl='curl' # Gatekeeping this
|
||||
TG_BOTAPI='https://api.telegram.org/bot'
|
||||
BML_URL='https://www.bankofmaldives.com.mv/internetbanking/api'
|
||||
|
Loading…
x
Reference in New Issue
Block a user