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.
- Perl (≥ 5.10) with the following Perl modules:
- IO::Socket::SSL (≥ 1.31)
- IPC::Run (optionally, for password encryption)
- JSON or JSON::PP (the latter is a core module since Perl 5.14)
- LWP::UserAgent (≥ 5.802)
- Term::ReadLine::Gnu (only required by the “configure” command)
- GnuPG (optionally, for password encryption)
Cheat sheet for free software distributions
pacman -S perl-html-form perl-html-tree perl-lwp-protocol-https pacman -S perl-ipc-run gnupg # for password encryption pacman -S perl-term-readline-gnu # for the “configure” command
yum install perl-core perl-libwww-perl perl-IO-Socket-SSL perl-HTML-Tree perl-JSON yum install perl-IPC-Run gnupg2 # for password encryption yum install perl-Term-ReadLine-Gnu # for the “configure” command
Debian 7 (wheezy) or newer:
apt-get install libwww-perl libhtml-form-perl apt-get install libipc-run-perl gnupg # for password encryption apt-get install libterm-readline-gnu-perl # for the “configure” command
Cheat sheet for cpanm(1)
cpanm HTML::Form HTML::HeadParser HTML::TreeBuilder IO::Socket::SSL JSON::PP LWP::UserAgent LWP::Protocol::https Net::HTTPS Net::SSLeay cpanm IPC::Run # for password encryption cpanm Term::ReadLine::Gnu # for the “configure” command
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
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.