Created
January 11, 2020 05:15
-
-
Save Porrapat/34f711c8b482a7b945dc2c2517edab0a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ============ Login SCB ======================== | |
# To Use provide your username and password | |
# chmod -R 777 login_scb.sh | |
# ./login_scb.sh | |
# Please provide your username and password on https://www.scbeasy.com/ | |
username= | |
password= | |
# Please Specify Your cookie file (Any blank text file is OK.) | |
cookie_file=login-scb-cookie.txt | |
# Link on bank website | |
form_page=https://www.scbeasy.com/v1.4/site/presignon/index.asp | |
login_page_url=https://www.scbeasy.com/online/easynet/page/lgn/login.aspx | |
first_page_url=https://www.scbeasy.com/online/easynet/page/firstpage.aspx | |
statement_url=https://www.scbeasy.com/online/easynet/page/acc/acc_mpg.aspx | |
# Login and get SESSIONEASY variable and Cookie file | |
curl -s -L -b $cookie_file -c $cookie_file "$form_page" > /dev/null | |
SESSIONEASY=$(curl -X POST -d "LANG=T&LOGIN=$username&PASSWD=$password" -s -L -b $cookie_file -c $cookie_file "$login_page_url" | grep -oP '(?<=NAME="SESSIONEASY"\s{1}VALUE=")[^"]*(?=")') | |
echo "SESSIONEASY IS : $SESSIONEASY" | |
echo "COOKIE FILE IS : $cookie_file" | |
# Show your money on bank protected page. | |
echo "======= YOU HAVE MONEY IN scbeasy.net (THB) =====" | |
curl -X POST -s -b $cookie_file -d "SESSIONEASY=$SESSIONEASY" "$statement_url" | grep -oP "([0-9.,]+)(?=<\/strong><\/td><td style=\"width: 230px;\">)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment