Venomen / mbank-cli

command line interface to mBank online banking system

Home Page:https://jwilk.net/software/mbank-cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is mbank-cli, a basic command-line interface to the online banking system of mBank.

Warning: You use mbank-cli on your own risk! The software is provided “as is”, without warranty of any kind.

Warning: mbank-cli uses the web interface at https://online.mbank.pl/ (or https://online.mbank.cz/, or https://online.mbank.sk/) which is subject to change unexpectedly.

Requirements

  • Perl (≥ 5.14) with the following Perl modules:
    • HTML::Form
    • HTML::TreeBuilder (≥ 5)
    • IO::Socket::SSL (≥ 1.81)
    • IPC::Run (optional: for password encryption, or for password manager support)
    • JSON or JSON::PP (the latter is a core module since Perl 5.14)
    • LWP::UserAgent (≥ 6)
    • LWP::Protocol::https
    • Net::HTTPS
    • Net::SSLeay (≥ 1.43)
    • Term::ReadLine::Gnu (optional: for account password prompt)
    • UUID::Tiny (not needed on Linux)
  • GnuPG (optional: for password encryption)

Cheat sheet for free software distributions

Arch Linux:

pacman -S perl-html-form perl-html-tree perl-lwp-protocol-https
pacman -S perl-term-readline-gnu  # for account password prompt
pacman -S perl-ipc-run  # for password management
pacman -S gnupg  # for password encryption

CentOS 7:

yum install epel-release  # some packages are only in EPEL
yum install perl-core perl-LWP-Protocol-https perl-HTML-Form perl-HTML-Tree
yum install perl-Term-ReadLine-Gnu  # for account password prompt
yum install perl-IPC-Run  # for password management

Debian 8 (jessie) or newer; Ubuntu 14.04 (trusty) or newer:

apt-get install libwww-perl libhtml-form-perl
apt-get install libterm-readline-gnu-perl  # for account password prompt
apt-get install libipc-run-perl  # for password management
apt-get install gnupg  # for password encryption

Cheat sheet for cpanm(1)

cpanm HTML::Form HTML::TreeBuilder IO::Socket::SSL JSON::PP LWP::UserAgent LWP::Protocol::https Net::HTTPS Net::SSLeay UUID::Tiny
cpanm Term::ReadLine::Gnu  # for account password prompt
cpanm IPC::Run  # for password management

CA certificate

mbank-cli has to verify that the server certificate has been signed by a trusted CA (certificate authority). Unlike many other TLS clients, it doesn't trust all the CAs whose certificates are installed system-wide, but only DigiCert High Assurance EV Root CA, which is known to be the root CA for mBank.

mbank-cli tries to find the certificate in the system certificate directory; if that fails, it uses ca.crt from the same directory as the script itself.

This procedure might not be adequate when the program is installed system-wide on some operating systems. Packagers/administrators might want to patch the get_default_ca_path() subroutine in such case.

About

command line interface to mBank online banking system

https://jwilk.net/software/mbank-cli

License:MIT License


Languages

Language:Perl 94.1%Language:Shell 2.5%Language:Python 1.9%Language:Makefile 1.5%