1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
use strict; use warnings; use 5.010; use Net::FTP; my $ftp = Net::FTP->new( "server.intern", Debug => 1, # SSL_verify_mode => 0, # siehe auch IO::Socket::SSL ) or die "Cannot connect to server.intern: $@"; $ftp->starttls(); $ftp->login("test",'test') or die "Cannot login ", $ftp->message; $ftp->cwd("/") or die "Cannot change working directory ", $ftp->message; $ftp->quit;
QuoteNet::FTP>>> Net::FTP(2.77)
Net::FTP>>> Exporter(5.67)
Net::FTP>>> Net::Cmd(2.29)
Net::FTP>>> IO::Socket::INET(1.33)
Net::FTP>>> IO::Socket(1.34)
Net::FTP>>> IO::Handle(1.33)
Net::FTP=GLOB(0x31b3b34)<<< 220 FTP on ***** ready
Can't locate object method "starttls" via package "Net::FTP" at test_ftp.pl line 34.
Quotehabe ich.Net::FTP>>> Net::FTP(3.05)
Net::FTP>>> Exporter(5.70)
Net::FTP>>> Net::Cmd(3.05)
Net::FTP>>> IO::Socket::SSL(2.012)
Net::FTP>>> IO::Socket::IP(0.36)
Net::FTP>>> IO::Socket(1.31)
Net::FTP>>> IO::Handle(1.28)
QuoteNet::FTP>>> Net::FTP(3.05)
Net::FTP>>> Exporter(5.67)
Net::FTP>>> Net::Cmd(3.05)
Net::FTP>>> IO::Socket::INET6(2.69)
Net::FTP>>> IO::Socket(1.34)
Net::FTP>>> IO::Handle(1.33)
Net::FTP: Net::Cmd::_is_closed(): unexpected EOF on command channel: at test_ftp.pl line 28.
Fehler in 33 at test_ftp.pl line 28.
1 2 3 4 5
my $ftp = Net::FTP->new( *******, Debug => 1, Timeout => 60, ) or die 'Fehler in '.__LINE__;
2015-03-04T17:11:12 GwenDragonFirewall bei dir?
2015-03-04T17:11:12 GwenDragonStateful inspection spinnt bei WIndows ab und an rum.
Siehe den Befehl für netsh
netsh advfirewall set global StatefulFTP disable
unter https://technet.microsoft.com/en-us/library/dd4217...
Probier mal bei new auch ein Passive => 1,
2015-03-04T16:34:02 GwenDragonQuotehabe ich....
Net::FTP>>> IO::Socket::SSL(2.012)...
Quotecpan> install IO::Socket::SSL
Database was generated on Wed, 04 Mar 2015 16:56:15 GMT
Running install for module 'IO::Socket::SSL'
Running make for S/SU/SULLR/IO-Socket-SSL-2.012.tar.gz
Checksum for C:\strawberry\cpan\sources\authors\id\S\SU\SULLR\IO-Socket-SSL-2.012.tar.gz ok
Scanning cache C:\strawberry\cpan\build for sizes
.........................................................................---DONE
CPAN.pm: Building S/SU/SULLR/IO-Socket-SSL-2.012.tar.gz
Should I do external tests?
These test will detect if there are network problems and fail soft,
so please disable them only if you definitely don't want to have any
network traffic to external sites. [Y/n] [y] n
Checking if your kit is complete...
Looks good
Writing Makefile for IO::Socket::SSL
Writing MYMETA.yml and MYMETA.json
cp lib/IO/Socket/SSL.pm blib\lib\IO\Socket\SSL.pm
cp lib/IO/Socket/SSL.pod blib\lib\IO\Socket\SSL.pod
cp lib/IO/Socket/SSL/PublicSuffix.pm blib\lib\IO\Socket\SSL\PublicSuffix.pm
cp lib/IO/Socket/SSL/Intercept.pm blib\lib\IO\Socket\SSL\Intercept.pm
cp lib/IO/Socket/SSL/Utils.pm blib\lib\IO\Socket\SSL\Utils.pm
SULLR/IO-Socket-SSL-2.012.tar.gz
C:\strawberry\c\bin\dmake.exe -- OK
Running make test
C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/01loadmodule.t .................. 1/3 # openssl version=0x1000105f
# Net::SSLeay::VERSION=1.52
t/01loadmodule.t .................. ok
t/acceptSSL-timeout.t ............. 1/15
QuoteNet::FTP>>> Net::FTP(3.05)
Net::FTP>>> Exporter(5.70)
Net::FTP>>> Net::Cmd(3.05)
Net::FTP>>> IO::Socket::IP(0.36)
Net::FTP>>> IO::Socket(1.34)
Net::FTP>>> IO::Handle(1.33)
Net::FTP=GLOB(0x31f8d7c)<<< 220 FTP on ******* ready
IO::Socket::SSL >= 2.007 needed for SSL support at test_ftp.pl line 34.
Quotecpan> install IO::Socket::SSL
Database was generated on Wed, 04 Mar 2015 16:56:15 GMT
Running install for module 'IO::Socket::SSL'
Running make for S/SU/SULLR/IO-Socket-SSL-2.012.tar.gz
Checksum for C:\strawberry\cpan\sources\authors\id\S\SU\SULLR\IO-Socket-SSL-2.012.tar.gz ok
Scanning cache C:\strawberry\cpan\build for sizes
............................................................................DONE
CPAN.pm: Building S/SU/SULLR/IO-Socket-SSL-2.012.tar.gz
Should I do external tests?
These test will detect if there are network problems and fail soft,
so please disable them only if you definitely don't want to have any
network traffic to external sites. [Y/n] [y] n
Checking if your kit is complete...
Looks good
Writing Makefile for IO::Socket::SSL
Writing MYMETA.yml and MYMETA.json
cp lib/IO/Socket/SSL.pm blib\lib\IO\Socket\SSL.pm
cp lib/IO/Socket/SSL.pod blib\lib\IO\Socket\SSL.pod
cp lib/IO/Socket/SSL/PublicSuffix.pm blib\lib\IO\Socket\SSL\PublicSuffix.pm
cp lib/IO/Socket/SSL/Intercept.pm blib\lib\IO\Socket\SSL\Intercept.pm
cp lib/IO/Socket/SSL/Utils.pm blib\lib\IO\Socket\SSL\Utils.pm
SULLR/IO-Socket-SSL-2.012.tar.gz
C:\strawberry\c\bin\dmake.exe -- OK
Running make test
C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/01loadmodule.t .................. 1/3 # openssl version=0x1000105f
# Net::SSLeay::VERSION=1.52
t/01loadmodule.t .................. ok
t/acceptSSL-timeout.t ............. ok
t/alpn.t .......................... skipped: ALPN not available in Net::SSLeay
t/auto_verify_hostname.t .......... ok
t/cert_formats.t .................. ok
t/cert_no_file.t .................. ok
t/compatibility.t ................. ok
t/connectSSL-timeout.t ............ Dubious, test returned 8 (wstat 2048, 0x800)
All 16 subtests passed
t/core.t .......................... ok
t/dhe.t ........................... ok
t/ecdhe.t ......................... skipped: no support for ecdh with this openssl/Net::SSLeay
t/io-socket-inet6.t ............... ok
t/io-socket-ip.t .................. ok
t/memleak_bad_handshake.t ......... skipped: ps not implemented on this platform
t/mitm.t .......................... ok
t/nonblock.t ...................... ok
t/npn.t ........................... ok
t/plain_upgrade_downgrade.t ....... # -- test: newINET start_SSL stop_SSL start_SSL
# server accepted new client
# wait for initial data from client
# got 0x666f6f from client
# server: got plain data at start of connection
# server: TLS upgrade
t/plain_upgrade_downgrade.t ....... 1/15 # server: TLS downgrade
# server: TLS upgrade#2
# -- test: newSSL stop_SSL connect_SSL
# server accepted new client
# wait for initial data from client
# got 0x160301 from client
# server: TLS upgrade
# server: TLS downgrade
# server: TLS upgrade#2
# -- test: newSSL:0 connect_SSL stop_SSL connect_SSL
# server accepted new client
# wait for initial data from client
# got 0x666f6f from client
# server: got plain data at start of connection
# server: TLS upgrade
# server: TLS downgrade
# server: TLS upgrade#2
# -- test: newSSL:0 start_SSL stop_SSL connect_SSL
# server accepted new client
# wait for initial data from client
# got 0x666f6f from client
# server: got plain data at start of connection
# server: TLS upgrade
# server: TLS downgrade
# server: TLS upgrade#2
# server accepted new client
# wait for initial data from client
# got 0x656e64 from client
# client requested end of tests
t/plain_upgrade_downgrade.t ....... ok
t/protocol_version.t .............. ok
t/public_suffix_lib_encode_idn.t .. ok
t/public_suffix_lib_libidn.t ...... ok
t/public_suffix_lib_uri.t ......... ok
t/public_suffix_ssl.t ............. ok
t/readline.t ...................... ok
t/sessions.t ...................... ok
t/signal-readline.t ............... skipped: signals not relevant on this platform
t/sni.t ........................... ok
t/sni_verify.t .................... ok
t/start-stopssl.t ................. ok
t/startssl-failed.t ............... ok
t/startssl.t ...................... ok
t/sysread_write.t ................. ok
t/verify_fingerprint.t ............ 1/12
QuoteNet::FTP>>> Net::FTP(3.05)
Net::FTP>>> Exporter(5.64_03)
Net::FTP>>> Net::Cmd(3.05)
Net::FTP>>> IO::Socket::SSL(2.012)
Net::FTP>>> IO::Socket::IP(0.36)
Net::FTP>>> IO::Socket(1.32)
Net::FTP>>> IO::Handle(1.31)
Net::FTP=GLOB(0x28961d8)<<< 220 FTP on ***** ready
Net::FTP=GLOB(0x28961d8)>>> AUTH TLS\r
Net::FTP=GLOB(0x28961d8)<<< 234 AUTH TLS successful
Fehler in 37 wegen 'SSL connect attempt failed error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed' at /pfad/test_ftp.pl line 37.
$ftp->starttls() or die "Fehler in ".__LINE__." wegen '$@'";
SSL_verify_mode => 0,
2015-03-05T18:07:00 GwenDragonHab ich das irgendwo mal falsch gehabt? Kann gut sein, bei den vielen Versuchen :)Übrigens muss es $ftp->starttls(); heißen, wenn du über Port 21 mit SSL gehst.
Quoteangezeigt.IO::Socket::SSL >= 2.007 needed for SSL support...
QuoteNet::SSLeay version 1.46 required--this is only version 1.42 at /pfadzumeinenmodulen/IO/Socket/SSL.pm line 19
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
/usr/bin/make 2>&1:
cp lib/Net/SSLeay.pm blib/lib/Net/SSLeay.pm
AutoSplitting blib/lib/Net/SSLeay.pm (blib/lib/auto/Net/SSLeay)
blib/lib/Net/SSLeay.pm: some names are not unique when truncated to 8 characters:
directory blib/lib/auto/Net/SSLeay:
do_https3.al, do_https2.al, do_https4.al, do_https.al truncate to do_https
do_httpx3.al, do_httpx2.al, do_httpx4.al truncate to do_httpx
get_https.al, get_https3.al, get_https4.al, get_http.al, get_http3.al, get_http4.al, get_httpx.al, get_httpx3.al, get_httpx4.al truncate to get_http
head_https.al, head_https3.al, head_https4.al, head_http.al, head_http3.al, head_http4.al, head_httpx.al, head_httpx3.al, head_httpx4.al truncate to head_htt
post_https.al, post_https3.al, post_https4.al, post_http.al, post_http3.al, post_http4.al, post_httpx.al, post_httpx3.al, post_httpx4.al truncate to post_htt
put_https.al, put_https3.al, put_https4.al, put_http.al, put_http3.al, put_http4.al, put_httpx.al, put_httpx3.al, put_httpx4.al truncate to put_http
ssl_read_all.al, ssl_read_until.al, ssl_read_CRLF.al truncate to ssl_read
ssl_write_all.al, ssl_write_CRLF.al truncate to ssl_writ
tcp_read_all.al, tcp_read_until.al, tcp_read_CRLF.al truncate to tcp_read
tcp_write_all.al, tcp_write_CRLF.al truncate to tcp_writ
cp lib/Net/SSLeay.pod blib/lib/Net/SSLeay.pod
cp lib/Net/SSLeay/Handle.pm blib/lib/Net/SSLeay/Handle.pm
/usr/bin/perl "-Iinc" /usr/share/perl/5.14/ExtUtils/xsubpp -typemap /usr/share/perl/5.14/ExtUtils/typemap -typemap typemap SSLeay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c
cc -c -I/usr/include -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.68\" -DXS_VERSION=\"1.68\" -fPIC "-I/usr/lib/perl/5.14/CORE" SSLeay.c
{standard input}: Assembler messages:
{standard input}:130493: Warning: end of file in string; '"' inserted
cc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
make: *** [SSLeay.o] Error 4
if everything looks okay, you may now make the tests: test
QuoteNet::SSLeay object version 1.42 does not match bootstrap parameter 1.58 at /pfad/perlmodule/Net/SSLeay.pm line 371.
Compilation failed in require at /pfad/test_ftp.pl line 18.
BEGIN failed--compilation aborted at /pfad/test_ftp.pl line 18.
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
#!/usr/bin/perl use strict; use warnings; use lib '/pfad/perlmodule'; use lib '/pfad/perlmodule/lib/perl/5.10.0'; print "INC:\n".join("\n",@INC); print "\n\n\n\n"; print "Version Net::FTP: ".$Net::FTP::VERSION."\n"; print "Version Exporter: ".$Exporter::VERSION."\n"; print "Version Net::Cmd: ".$Net::Cmd."\n"; print "Version IO::Socket::SSL: ".$IO::Socket::SSL::VERSION."\n"; print "Version IO::Socket::IP: ".$IO::Socket::IP::VERSION."\n"; print "Version IO::Handle: ".$IO::Handle::VERSION."\n"; print "Version Net::SSLeay: ".$Net::SSLeay::VERSION."\n"; use Net::SSLeay 1.58; use IO::Socket::SSL 2.012; use Net::FTP 3.05; #use Net::FTP::File; my $ftp = Net::FTP->new( ***, Debug => 1, Timeout => 60, Passive => 1, SSL_verify_mode => 0, ) or die 'Fehler in '.__LINE__; $ftp->starttls() or die "Fehler in ".__LINE__." wegen '$@'"; $ftp->login(***,***) or die 'Fehler in '.__LINE__; my $hash_ref = $ftp->dir('/tmpdevelop'); for my $key (0..$#{$hash_ref}) { my @feld = split /[ ]+/,$hash_ref->[$key]; print "Zeile: '".join('*',@feld)."'\n"; }
2015-03-05T18:07:00 GwenDragonDas Serverzertifikat konnte nicht überprüft werden. Brauchst du das?