GithubHelp home page GithubHelp logo

jwilk / mbank-cli Goto Github PK

View Code? Open in Web Editor NEW
39.0 39.0 9.0 4.44 MB

command line interface to mBank online banking system

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

License: MIT License

Perl 94.78% Shell 2.01% Python 1.31% Makefile 1.90%

mbank-cli's People

Contributors

chilek avatar jwilk avatar l9i avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mbank-cli's Issues

deposits broken

deposits no longer show anything:

$ ./mbank-cli deposits | wc -l
0

Łukasz, would you care to take a look at it?

Changes to the web interface needs to be followed (2009-05-09)

Issue reported by witold.rugowski at Google Code:

Hi!
It looks like last weekend mBank have deployed new version of their app.
Now running ./mbank-cli without args (user and password in mbank-cli.conf) throws an error:

Oops, API error! [OnClick]

Money transfers

Issue reported by maciej.trebacz at Google Code:

Hi,
It would be great if there was some kind of API to send payments from given account. A command like:

./mbank-cli.pl [my-account-number] [receiver-account-number] [receiver-name] [...]
[one-time-password]

Doable?

Command problem

Issue reported by [email protected] at Google Code:

What steps will reproduce the problem?

./mbank-cli history --range 2009-06-01 2009-06-17 --all-accounts`

What is the expected output? What do you see instead?

Illegal value 'daterange' for field 'rangepanel_group' at ./mbank-cli-17-06-09/mbank-cli line 663

futures: exits after first account with empty list

Issue reported by [email protected] at Google Code:

What steps will reproduce the problem?

./mbank-cli futures --all-accounts

What is the expected output?
List of futures from all accounts.

What do you see instead?
List of futures from all accounts before first account with empty futures list.

What version of the product are you using? On what operating system?
fe26b82

Please provide any additional information below.
Program exists after first account with no futures. Should continue with next account. Patch attached.


Attachment: 155.patch

Support for MultiBank

Issue reported by acmosis at Google Code:

hello, some time ago I had written similar interface (in PHP), and from this work I'm quite sure that Multibank has almost identical quirks and countermeasures as mBank interface

does't work on Ubuntu 12.04 LTS (Precise Pangolin): read failed: at /usr/share/perl5/Net/HTTP/Methods.pm line 256

Issue reported by marcin.szafranski at Google Code:

szafran@NAS:~/.sources/mbank-cli$ ./mbank-cli list
HTTP error while processing request <GET https://www.mbank.com.pl/>
| read failed:  at /usr/share/perl5/Net/HTTP/Methods.pm line 256
|  at /usr/lib/perl5/Net/SSL.pm line 210
|       Net::SSL::die_with_error('LWP::Protocol::https::Socket=GLOB(0x10b3bb0)', 'read failed') called at /usr/lib/perl5/Net/SSL.pm line 223
|       Net::SSL::read('LWP::Protocol::https::Socket=GLOB(0x10b3bb0)', '', 1024, 0) called at /usr/share/perl5/Net/HTTP/Methods.pm line 256
|       Net::HTTP::Methods::my_readline('LWP::Protocol::https::Socket=GLOB(0x10b3bb0)', 'Status') called at /usr/share/perl5/Net/HTTP/Methods.pm line 343
|       Net::HTTP::Methods::read_response_headers('LWP::Protocol::https::Socket=GLOB(0x10b3bb0)', 'laxed', 1, 'junk_out', 'ARRAY(0xf4b5d0)') called at /usr/share/perl5/LWP/Protocol/http.pm line 378
|       LWP::Protocol::http::request('LWP::Protocol::https=HASH(0xf05930)', 'HTTP::Request=HASH(0xeaceb8)', undef, undef, 1048576, 30) called at /usr/share/perl5/LWP/UserAgent.pm line 192
|       eval {...} called at /usr/share/perl5/LWP/UserAgent.pm line 191
|       LWP::UserAgent::send_request('LWP::UserAgent=HASH(0xe3cfd0)', 'HTTP::Request=HASH(0xeaceb8)', undef, 1048576) called at /usr/share/perl5/LWP/UserAgent.pm line 274
|       LWP::UserAgent::simple_request('LWP::UserAgent=HASH(0xe3cfd0)', 'HTTP::Request=HASH(0xeaceb8)', undef, 1048576) called at /usr/share/perl5/LWP/UserAgent.pm line 282
|       LWP::UserAgent::request('LWP::UserAgent=HASH(0xe3cfd0)', 'HTTP::Request=HASH(0xeaceb8)', undef, 1048576) called at ./mbank-cli line 290
|       main::download('HTTP::Request=HASH(0xeaceb8)') called at ./mbank-cli line 734 at ./mbank-cli line 269
        main::http_error('HTTP::Request=HASH(0xeaceb8)') called at ./mbank-cli line 291
        main::download('HTTP::Request=HASH(0xeaceb8)') called at ./mbank-cli line 734

szafran@NAS:~/.sources/mbank-cli$ uname -a
Linux NAS 3.5.0-28-generic #48~precise1-Ubuntu SMP Wed Apr 24 21:42:24 UTC 2013 x86_64
x86_64 x86_64 GNU/Linux
szafran@NAS:~/.sources/mbank-cli$ perl -v

This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi

feature request: double check range selection "now" could first check fields set by mbank server

Issue reported by acmosis at Google Code:

problem:
range now relies on local date and time settings.
this produces "API errors" when server is in different timezone.

suggested solution:
daterange_to_day and other values are already preset on mbank history form (<input name="daterange_to_day" value="[current mbank day]">) .
these values could be checked against user values (for example if now is 2008-06-17 and server gives daterange_to_day value = 16 -> use server value)

history: mangled details field

Issue reported by [email protected] at Google Code:

What steps will reproduce the problem?

./mbank-cli history "mBIZNES Konto" from=2009-06-10 to=2009-06-10

What is the expected output? What do you see instead?
there is:

2009-06-09      2009-06-09         XX PLN    XX PLN    PRZELEW ZEWN�TRZNY PRZYCHODZ�CY KOKOSA XX/XXX TYCHY PRZELEW ZA CZERWIEC 209 KOWALSKI JAN UL.KOKOSA XX/XXX 43-100 TYCHY      XYZACCOUNTXYZ        JAN KOWALSKI

should be:

2009-06-09      2009-06-09         XX PLN    XX PLN    PRZELEW ZEWN�TRZNY PRZYCHODZ�CY KOWALSKI JAN UL.KOKOSA XX/XXX 43-100 TYCHY      XYZACCOUNTXYZ JAN KOWALSKI KOKOSA XX/XXX TYCHY PRZELEW ZA CZERWIEC 209

Support for credit cards

Issue reported by szymon.zygmunt at Google Code:

Is possible to extension functionality for credit cards (current and withholdings operatione etc.)?

Documentation is wrong about where configuration file etc. are looked up

Issue reported by piotr.sulecki at Google Code:

What steps will reproduce the problem?

  1. install Cygwin 1.7, mbank-cli and all the required modules,
  2. create the config file as described in the docs,
  3. run mbank-cli list

What is the expected output? What do you see instead?
Expected output is the account list. All I get is:
Can't open the config file: No such file or directory

What version of the product are you using? On what operating system?
mbank-cli-20100905 under Cygwin-1.7.7.

Please provide any additional information below.
strace does show an attempt to open the ./mbank-cli.conf file, but earlier it shows a successful chdir call setting the current dir to /usr/bin. Once I created a symlink in /usr/bin pointing to my home directory, to mbank-cli.conf, the error message disappeared. So, the file is searched for in /usr/bin instead of in the current directory.

encode::decode with polish characters on english locale

Issue reported by acmosis at Google Code:

What steps will reproduce the problem?

./mbank_cli history

What is the expected output? What do you see instead?
expected output: polish characters replaced or malformed ;)
see instead: several times:

"\x{0118}" does not map to ascii at ./mbank-cli line 357.

and in the text:

PRZELEW ZEWN\x{0118}TRZNY WYCHODZ\x{0104}CY

quick workaround is to put:

$details =~
tr/\x{0104}\x{0106}\x{0118}\x{0141}\x{0143}\x{0d3}\x{015a}\x{0179}\x{017b}/ACELNOSZZ/;

on mbank_cli line 356

or modify function widen_string:

  $_= Encode::decode($codeset, $_);
  $_ =~
tr/\x{0104}\x{0106}\x{0118}\x{0141}\x{0143}\x{0d3}\x{015a}\x{0179}\x{017b}/ACELNOSZZ/;
  return ($_);

perhaps this workaround is sufficient - this type of character coding occurs only when Encode:: has a problem.

http://perldoc.perl.org/Encode.html#Handling-Malformed-Data

history option 'range' produces API error

Issue reported by acmosis at Google Code:

used command line:

./mbank-cli history eKONTO --from 2008-06-09
./mbank-cli history eKONTO --from now

expected: history from previous day/current day
result:

Oops, API error! [History1]

./mbank-cli history command without --from or --range is working nicely

using debian testing, 38787b9

Some web api changes

Issue reported by [email protected] at Google Code:

I guess there has been made some major changes in web application (last weekend), so It doesn't work anymore :-(((

./mbank-cli-19-06-09/mbank-cli history --range 2009-11-17 2009-11-21 --all-accounts

output

Oops, API error! [History2]

future|witholdings: doesn't work with account held in $

Issue reported by [email protected] at Google Code:

What steps will reproduce the problem?

  1. Call mLine and request opening eMAX USD account :)
  2. a) ./mbank_cli future --all-accounts
  3. b) ./mbank_cli withholdings --all-accounts

What is the expected output?
List of futures|withholdings from all accounts.

What do you see instead?
List of futures|withholdings from all accounts before eMAX USD.

What version of the product are you using? On what operating system?
fe26b82

Please provide any additional information below.
When called ./mbank-cli action --all-accounts with (future|withholdings) action, finishes with no error, but error could be found in debug files (invalidated session). Cause: Account held in U.S. dollars has neither future nor withholding option in menu. Patch attached to skip accounts without current action in menu.


Attachment: 157.patch

Error processing request?

Issue reported by witold.rugowski at Google Code:

It is only me or something have changed in mBank interface:

$ ./mbank-cli
HTTP error while processing request <GET https://www.mbank.com.pl/accounts_list.aspx>

Current code from hg (after pull and update), I can log in with browser using data from mbank-cli.conf.

notices: no account notices listed

Issue reported by [email protected] at Google Code:

What steps will reproduce the problem?

./mbank-cli notices

What is the expected output?
All notices visible on WWW.

What do you see instead?
No account notices ("Odrzucone polecenie zapłaty", "Odrzucony przelew") are shown.

What version of the product are you using? On what operating system?
fe26b82


Attachment: 156.patch

[patch] add read buffer suggestion to fix SSL timeout in some envs

Issue reported by marcin.gryszkalis at Google Code:

-  my $response = $ua->request($request);
+  my $response = $ua->request($request, undef, 1024 * 1024);

In some environments LWP hangs in reading SSL stream and timeouts with something like

'x-died' => 'read timeout at /usr/lib64/perl5/vendor_perl/5.16.1/Net/HTTP/Methods.pm line 236.',
'client-aborted' => 'die'

used SSL implementation doesn't matter, only adding above read buffer length hint helps.

Czy macie problemy z SSL mbanku?

Issue reported by witold.rugowski at Google Code:

Na dwóch instancjach na różnych komputerach (Ubuntu 13.04 i Debian 6.0) działał sobie skrypt bez problemu od wczoraj wieczorem przy próbie odczytania:

$ ./mbank-cli
HTTP error while processing request <GET https://www.mbank.com.pl/accounts_list.aspx>
| SSL negotiation failed:  at /usr/local/share/perl/5.14.2/LWP/Protocol/http.pm line 31
|  at /usr/local/share/perl/5.14.2/LWP/Protocol/http.pm line 31
| ; Connection reset by peer at /usr/local/share/perl/5.14.2/LWP/Protocol/http.pm line 31
| ; Connection reset by peer at /usr/local/share/perl/5.14.2/LWP/Protocol/http.pm line 31
 at ./mbank-cli line 269
    main::http_error('HTTP::Request=HASH(0x92cd954)') called at ./mbank-cli line 291
    main::download('HTTP::Request=HASH(0x92cd954)') called at ./mbank-cli line 718

Co drugi, trzeci raz tak się dzieje przy różnych URLach, czasem logon, czasem account_list... Oczywiście żadne bardziej szczegółowe operacje (history) się nie udają, bo trafia przynajmniej raz na wyjątek i całość się wysypuje.
Czy macie podobne objawy i to coś nie tak za w mbanku czy może być problem po stronie klienta? O ile Ubuntu był ostatnio upgradeowany to na Debianie w ostatnich kilku dniach nie było żadnych update, więc biblioteki sie nie zmieniły...

Exception in future command

Issue reported by szymon.zygmunt at Google Code:

I have trouble with future command in mbank-cli. I suspect that is some error in description field - FAKTURA VAT F/10569286/06/1&shy;<wbr />2 (operation automatically added by accept invobil (formerly billix) payment).
Is it possible to fix this issue?


Attachment: future_operation_list.aspx

Problem with account with balance below 0

Issue reported by rafal.sliwka at Google Code:

What steps will reproduce the problem?

  1. The problem is that when my account balance is below 0 (-x,x) then on ./mbank-cli list i dont see that account (have 2 with balance below 0 :()

What is the expected output? What do you see instead?
4 accounts on the list, i see only 2 (with balance over 0)

What version of the product are you using? On what operating system?
64f9326, i use it on Debian 4.0r3 (etch)

list: negative balance not supported

After the major changes to the web interface, the list command plausibly does not list accounts with negative balance.
A volonteer with such an account is needed!

API error in history

Issue reported by witold.rugowski at Google Code:

Is this just me, or after last changes history command does not work:

$ ./mbank-cli history \*biezace
Oops, API error! [History2]

support SK and CZ

Issue reported by zdenop at Google Code:

Hello,
Do you plan to support also Slovak (https://sk.mbank.eu/) and Czech (https://cz.mbank.eu/) mbank accounts?
I tried to change url, but than I got error:

Oops, API error! [AccountsList0]

I can help with testing (Slovak).

TODO: manual page

mbank-cli should be shipped with a manual page that would (at least) describe precisely its usage.

history command does not work after last mbank release

Issue reported by acmosis at Google Code:

What steps will reproduce the problem?

./mbank-cli/mbank-cli history eKONTO

Output:

Oops, API error! [OnClick]

the configuration was working, the notices and all other additional 'windows' are deleted in mbank-www.

if there is paypal account to support this project, I would donate something to keep this project alive. please make one, and post it on "project home" :)

mbank-cli doesn't work until I set GPG_TTY

Issue reported by szymon.zygmunt at Google Code:

What steps will reproduce the problem?

  1. Encrypt login and password in mbank-cli.conf file
  2. Start mbank-cli without parameters

What is the expected output? What do you see instead?
When the GPG_TTY variable isn't set i get message like this:

You need a passphrase to unlock the secret key for
user: "Xxxx Xxxxxxxx (xxxx) <[email protected]>"
1024-bit RSA key, ID xxxxxxxx, created xxxx-xx-xx (main key ID xxxxxxxx)

pinentry-curses: no LC_CTYPE known - assuming UTF-8
                                                   pinentry-curses: no LC_CTYPE known
- assuming UTF-8
                      pinentry-curses: no LC_CTYPE known - assuming UTF-8
                                                                         pinentry-curses:
no LC_CTYPE known - assuming UTF-8

and top shows me 99% cpu usage.
After set and export GPG_TTY mbank-cli works.

please get rid of Apache::ConfigFile dependency

Issue reported by janowski.m at Google Code:

Hi, this is impossible to install Apache::ConfigFile.
I do: cpan Apache::ConfigFile and i have error: Warning: Cannot install Apache::ConfigFile, don't know what it is.

API error when using funds option

Issue reported by marcind1976md at Google Code:

When I use funds option I receive API error:

[marcinmd@server]$ ./mbank-cli funds
Oops, API error! [Funds1]

mbank-cli stopped working completely (after perl libwww update)

Issue reported by marcind1976md at Google Code:

Everything was working fine, even credit card extension till last Friday (21-Oct). I realized that data is not automatically updated and after running the program manually I saw the following messages:

HTTP error while processing request <GET https://www.mbank.com.pl/> at ./mbank-cli line 171
        main::http_error('HTTP::Request=HASH(0x8751ac8)') called at ./mbank-cli line 203
        main::download('HTTP::Request=HASH(0x8751ac8)') called at ./mbank-cli line 614

I decided to move the scripts to another server, where they are working fine. Later I noticed that Perl module has been updated:

yum: 1 packets installed/updated
Packages installed or updated:
perl-libwww-perl               security

On that server yum is set to update packages automatically every day. On the other server there is no autoupdate.

Can't locate Apache/ConfigFile.pm in @INC

Issue reported by danielmilde at Google Code:

Error:

Can't locate Apache2/ConfigFile.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./mbank-cli line 20.
BEGIN failed--compilation aborted at ./mbank-cli line 20.

Signiture of my Apache:

Apache/2.2.9 (Ubuntu) mod_fastcgi/2.4.6 mod_ssl/2.2.9 OpenSSL/0.9.8g mod_wsgi/2.3 Python/2.5.2 mod_perl/2.0.4 Perl/v5.10.0 Server at localhost Port 80

history: API error

Issue reported by [email protected] at Google Code:

I could say its better but the problem still exists
I mean it shows historry account but just from the first
Example -

./mbank-cli history --range 2009-06-17 2009-06-01 --all-accounts

Command show history account just from 17-06-2009 - doesn't show anything from the other days.
Output

Oops, API error! [History2]

Am I missing smth or its a bug?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.