{"id":22900566,"url":"https://github.com/rioastamal/shbca","last_synced_at":"2025-05-08T01:24:19.152Z","repository":{"id":42462307,"uuid":"65626155","full_name":"rioastamal/shbca","owner":"rioastamal","description":"shbca is a simple tool written in Bash to manage account on Klik BCA","archived":false,"fork":false,"pushed_at":"2022-04-04T23:05:21.000Z","size":18,"stargazers_count":25,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T16:11:27.904Z","etag":null,"topics":["bash","bca","klikbca","shell"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rioastamal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-13T16:22:31.000Z","updated_at":"2025-03-17T06:04:20.000Z","dependencies_parsed_at":"2022-09-21T03:13:17.274Z","dependency_job_id":null,"html_url":"https://github.com/rioastamal/shbca","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rioastamal%2Fshbca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rioastamal%2Fshbca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rioastamal%2Fshbca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rioastamal%2Fshbca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rioastamal","download_url":"https://codeload.github.com/rioastamal/shbca/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252979821,"owners_count":21835119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bca","klikbca","shell"],"created_at":"2024-12-14T01:28:49.368Z","updated_at":"2025-05-08T01:24:19.103Z","avatar_url":"https://github.com/rioastamal.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\nshbca is a simple tool written in Bash to manage account on Klik BCA.\nThe main aim of this tool is to quickly get information of balance or\ntransactions history on your BCA account using\ncommand line interface (CLI).\n\nshbca depends heavily on curl to emulate the browser request.\nIt uses the mobile site version of Klik BCA to parse the account information.\nshbca advertise itself as iPhone device while connecting to Klik BCA.\n\n## Requirements\n\nshbca require Bash (tested with Bash 3.2.57 on Mac OS X El Capitan) and other shell utilities:\n\n* awk\n* cat\n* curl\n* date\n* grep\n* head\n* sed\n* tail\n* wc\n\nThose shell utilities should be available in most Linux distribution and Unix\ncompatible OS such as Mac OS X - even Windows using cygwin.\n\n## Installation\n\nClone the project repository via github:\n\n```\n$ git clone git@github.com/astasoft/shbca.git\n```\n\nAnother altertive is download the zip tarball and extract it somewhere in your box.\n\n## Usage and Examples\n\nRunning shbca with `-h` option will give you list of option that shbca supports.\n\n```\n$ ./shbca.sh -h\nUsage: ./shbca.sh [OPTIONS]\n\nWhere OPTIONS:\n  -a ACTION     specify action name using ACTION\n  -c FILE       read config file from FILE\n  -h            print this help and exit\n  -i IP         specify IP address using IP. Default value will parse from\n                http://wtfismyip.com/text\n  -p            specify klik BCA password. It will prompt an input.\n  -r            dry run mode. Print the curl command\n  -u USER       specify klik BCA username using USER\n  -v            print the shbca version\n\nList of available ACTION:\n  - login\n  - logout\n  - check_balance\n  - check_balance_wlogin\n  - check_transaction_history\n  - check_transaction_history_wlogin\n  - cth (alias of check_transaction_history)\n  - cth_wlogin (alias of check_transaction_history_wlogin)\n\nshbca is a command line interface to manage BCA Bank account written in Bash.\nshbca is free software licensed under MIT. Visit the project homepage\nat http://github.com/astasoft/shbca.\n```\n\nThere are few action you can perform using shbca. The list of action are described below.\n\nAction | Description | Prerequisite action | Alias\n-------|-------------|---------------------|------\nlogin  | Login to Klik BCA account | - | -\nlogout | Logout from Klik BCA account | login | -\ncheck_balance | Check account balance | login | -\ncheck_balance_wlogin | Check account balance with auto login and logout | - | -\ncheck_transaction_history | Get list of transactions history (statement) | login | cth\ncheck_transaction_history_wlogin | Get list of transactions history with auto login and logout | - | cth_wlogin\n\n### Login to Klik BCA\n\nTo login to Klik BCA you need to pass action `login` to shbca. See example below.\n\n```\n$ ./shbca -a login -u USERNAME -p -i 8.8.8.8\nEnter Klik BCA Password:\nLogged in to Klik BCA\n```\n\nYou can see the log file for details what happening or you can turn on\ndebug mode by specifying value of environment variable `BCA_DEBUG` to `true`.\n\n```\n$ BCA_DEBUG=true ./shbca.sh -a login -u USERNAME -p -i 8.8.8.8\nEnter Klik BCA Password:\n[DEBUG]: Logging in to https://m.klikbca.com/authentication.do with data username: ******, password: ******  ip address: 8.8.8.8\n[DEBUG]: Executing command -\u003e curl -X POST --cookie-jar \"./shbca.cookie\" --cookie \"./shbca.cookie\" -H \"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1\" --connect-timeout 120 -i -s --data 'value(user_id)=******' --data 'value(pswd)=*****' --data 'value(Submit)=LOGIN' --data 'value(actions)=login' --data 'value(user_ip)=8.8.8.8' --data 'user_ip=8.8.8.8' --data 'value(mobile)=true' --data 'mobile=true' -H \"Referer: https://m.klikbca.com/login.jsp\" https://m.klikbca.com/authentication.do \u003e ./tmp/curl-post.authentication.do.html\n[DEBUG]: Saving login output to ./tmp/curl-post.authentication.do.html\n[DEBUG]: successully login to Klik BCA as ******\nLogged in to Klik BCA\n```\n\n### Checking Account Balance\n\nTo check your BCA account balance you can use `check_balance` action. Remember to do login action first.\n\n```\n$ ./shbca.sh -a check_balance\nAccount number: 1234567890. Balance left: 799,989,310.29\n```\n\n### Checking Account Balance with Auto Login and Logout\n\nThis action simplify the process of checking account balance by grouping series of actions into only one. So, you don't have to do login and logout manually. To\nrun the action you can use `check_balance_wlogin`.\n\n```\n$ ./shbca.sh -a check_balance_wlogin -u USERNAME -p -i 8.8.8.8\nEnter Klik BCA Password:\nLogged in to Klik BCA\nAccount number: 1234567890. Balance left: 799,989,310.29\nLogged out from Klik BCA\n```\n\n### Checking Transactions History\n\nTo check transactions history (statements) you can use `check_transaction_history` action or the alias `cth`. You need to do login action first.\n\nThis action will only grab statements from the last 7 days. Example below uses a config file.\n\n```\n$ ./shbca.sh -a check_transaction_history -c ./shbca.config\nFound 3 transaction(s). Printing the statements...\nTGL   DB/CR KETERANGAN\n---   ----- ----------\n10/08 DB    TARIKAN ATM 09/08\n            0000\n            500,000.00\n---   ----- ----------\n15/08 DB    KARTU KREDIT\n            TANGGAL :13/08\n            0100 BCA CARD\n            54131234567890\n            RIO ASTAMAL\n            0000\n            123,345.00\n---   ----- ----------\n15/08 DB    TARIKAN ATM 14/08\n            0000\n            500,000.00\n---   ----- ----------\n```\n\n### Checking Transaction History with Auto Login and Logout\n\nThis action simplify checking transactions history by doing the login and logout process automatically. To use it specify `check_transaction_history_wlogin` or `cth_wlogin` for the action. Example below uses a config file.\n\n```\n$ ./shbca.sh -a cth_wlogin -c ./sh-bca.config\nLogged in to Klik BCA\nFound 3 transaction(s). Printing the statements...\nTGL   DB/CR KETERANGAN\n---   ----- ----------\n10/08 DB    TARIKAN ATM 09/08\n            0000\n            500,000.00\n---   ----- ----------\n15/08 DB    KARTU KREDIT\n            TANGGAL :13/08\n            0100 BCA CARD\n            54131234567890\n            RIO ASTAMAL\n            0000\n            123,345.00\n---   ----- ----------\n15/08 DB    TARIKAN ATM 14/08\n            0000\n            500,000.00\n---   ----- ----------\nLogged out from Klik BCA\n```\n\n### Logout from Klik BCA\n\nBy logging out the cookie which track your session will be cleared so you can not perform action which need login as prerequites action.\n\n```\n$ ./shbca.sh -a logout\nLogged out from Klik BCA\n```\n\n## Using Config File\n\nInstead of inputing username, password and other options directly when calling shbca, you can put the option value in configuration file by specifying it using\n`-c` option.\n\nAs an example below is checking account with auto login using config file named `shbca.config`.\n\n```\n$ ./shbca.sh -a check_balance_wlogin -c ./shbca.config\nLogged in to Klik BCA\nAccount number: 1234567890. Balance left: 799,989,310.29\nLogged out from Klik BCA\n```\n\nAt minimum you should only need three values on your config file.\n\n```\n#!/bin/bash\n#\n# shbca config file\n\n# Klik BCA Username\nBCA_LOGIN_USERNAME=\"YOUR_USERNAME\"\n\n# Klik BCA Password\nBCA_LOGIN_PASSWORD=\"YOUR_PASSWORD\"\n\n# Klik BCA Origin IP\n# Leave empty to get default public ip address from wtfismyip.com/text\nBCA_LOGIN_IP=8.8.8.8\n```\n\nFor list of detailed example of other available configuration you can take a look the content of `shbca.config.sample` file.\n\n## Security\n\nYour Klik BCA username and password are very sensitive information.\nThat's why shbca never log those information in clear text in the log file.\nshbca automatically replace it with asterisk characters `******`.\n\nIf you are using config file for storing your Klik BCA username and password,\nmake sure only you that can read the file. Change the permission to very minimal\nsuch as `0600`. Assuming the name of the config file is `shbca.config`.\n\n```\n$ chmod 0600 shbca.config\n```\n\n## Todo\n\n- Implements money transfer between BCA account\n\n## Author\n\nshbca is written by Rio Astamal \u003cme@rioastamal.net\u003e\n\n## License\n\nshbca is open source licensed under [MIT license](http://opensource.org/licenses/MIT).\n\n## Disclaimer\n\nThis tools is created by Rio Astamal it **has no** affiliation\nwith Bank Central Asia.\n\n### About Klik BCA\n\nKlik BCA https://www.klikbca.com is a service provided by\nBank Central Asia to its customer to do transactions via\ninternet banking. BCA and Klik BCA are Copyright (c) 2016 by PT Bank Central Asia Tbk.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frioastamal%2Fshbca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frioastamal%2Fshbca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frioastamal%2Fshbca/lists"}