Leser: 30
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
#!/usr/bin/perl -w use strict; use warnings; use IO::Socket::SSL; my %config = ( bankadressen => { 1 => { name => 'Postbank', addr => 'https://hbci.postbank.de/banking/hbci.do', port => 443, proto => 'tcp', }, 2 => { name => 'Sparkasse', addr => 'hbci-pintan-rl.s-hbci.de/PinTanServlet', port => 443, proto => 'tcp', }, }, bank_verwenden => 1, debug => 1, ); testconnect (\%config); ############################################################################### sub testconnect { print "Verbindungsaufbau zu '$config{bankadressen}{$config{bank_verwenden}}{name}'\n" if $config{debug}; my $client = IO::Socket::SSL -> new ( PeerAddr => $config{bankadressen}{$config{bank_verwenden}}{addr}, PeerPort => $config{bankadressen}{$config{bank_verwenden}}{port}, Proto => $config{bankadressen}{$config{bank_verwenden}}{proto}, ) || warn "Problem: " . IO::Socket::SSL::errstr(); print $client "GET / HTTP/1.0\r\n\r\n"; print <$client>; }
QuoteVerbindungsaufbau zu 'Postbank'
Problem: IO::Socket::INET configuration failederror:00000000:lib(0):func(0):reason(0) at test_fints.pl line 31.
Can't use string ("1") as a symbol ref while "strict refs" in use at test_fints.pl line 38.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
#!/usr/bin/perl -w use strict; use warnings; use IO::Socket::SSL; my %config = ( bankadressen => { 1 => { name => 'Postbank', addr => 'hbci.postbank.de', port => 443, proto => 'tcp', }, 2 => { name => 'Sparkasse', addr => 'hbci-pintan-rl.s-hbci.de/PinTanServlet', port => 443, proto => 'tcp', }, }, bank_verwenden => 1, debug => 1, ); testconnect (\%config); ############################################################################### sub testconnect { print "Verbindungsaufbau zu '$config{bankadressen}{$config{bank_verwenden}}{name}'\n" if $config{debug}; my $client = IO::Socket::SSL -> new ( PeerAddr => $config{bankadressen}{$config{bank_verwenden}}{addr}, PeerPort => $config{bankadressen}{$config{bank_verwenden}}{port}, Proto => $config{bankadressen}{$config{bank_verwenden}}{proto}, ) || warn "Problem: " . IO::Socket::SSL::errstr(); print $client "GET /banking/hbci.do HTTP/1.0\r\n\r\n"; print <$client>; }