Thread [LWP::UserAgent] "Ein nicht blockierender Socketvorgang konnte nicht sofort ausgeführt werden" (Perl 5.18 64bit) (33 answers)
Opened by bianca at 2015-03-23 07:43

GwenDragon
 2015-03-24 16:25
#180341 #180341
User since
2005-01-17
14533 Artikel
Admin1
[Homepage]
user image
Mit beherztem
cpan> notest install Net::FTP IO::Socket::SSL LWP LWP::Protocol::https
installiert.

Dann folgendes Testprogramm:
Code (perl): (dl )
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
#!/usr/bin/perl

use strict; 
use warnings;

use 5.010;
use Net::FTP;

my $ftp = Net::FTP->new(
    "*********.de", 
    SSL_verify_mode => 1,
    SSL_ca_file => 'X:\etc\ssl\certs\cacerts.pem',    
    Debug => 1
) or die "Cannot connect: $@";

$ftp->starttls();
$ftp->passive();

$ftp->login("*********",'****************')
  or die "Cannot login ", $ftp->message;
 
$ftp->cwd("/")
  or die "Cannot change working directory ", $ftp->message;
 
my @files = $ftp->ls()
  or die "ls failed ", $ftp->message;
  
say for @files;

$ftp->quit();


ergibt bei mir:

Code: (dl )
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
41
42
43
44
T:\>perl -v

This is perl 5, version 18, subversion 4 (v5.18.4) built for MSWin32-x64-multi-thread

Copyright 1987-2013, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

T:\>perl f.pl
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.32)
Net::FTP>>> IO::Socket(1.36)
Net::FTP>>> IO::Handle(1.34)
Net::FTP=GLOB(0x2e8e0a8)<<< 220 ***.***.**.*** FTP server ready
Net::FTP=GLOB(0x2e8e0a8)>>> AUTH TLS
Net::FTP=GLOB(0x2e8e0a8)<<< 234 AUTH TLS successful
Net::FTP=GLOB(0x2e8e0a8)>>> PBSZ 0
Net::FTP=GLOB(0x2e8e0a8)<<< 200 PBSZ 0 successful
Net::FTP=GLOB(0x2e8e0a8)>>> PROT P
Net::FTP=GLOB(0x2e8e0a8)<<< 200 Protection set to Private
Net::FTP=GLOB(0x2e8e0a8)>>> USER us123456789
Net::FTP=GLOB(0x2e8e0a8)<<< 331 Password required for us123456789
Net::FTP=GLOB(0x2e8e0a8)>>> PASS ....
Net::FTP=GLOB(0x2e8e0a8)<<< 230 User us123456789 logged in
Net::FTP=GLOB(0x2e8e0a8)>>> CWD /
Net::FTP=GLOB(0x2e8e0a8)<<< 250 CWD command successful
Net::FTP=GLOB(0x2e8e0a8)>>> PASV
Net::FTP=GLOB(0x2e8e0a8)<<< 227 Entering Passive Mode (***,***,***,***,**,**).
Net::FTP=GLOB(0x2e8e0a8)>>> NLST
Net::FTP=GLOB(0x2e8e0a8)<<< 150 Opening BINARY mode data connection for file list
Net::FTP=GLOB(0x2e8e0a8)<<< 226 Transfer complete
favicon.ico
404.html
index.html
Net::FTP=GLOB(0x2e8e0a8)>>> QUIT
Net::FTP=GLOB(0x2e8e0a8)<<< 221 Goodbye.
die Drachin, Gwendolyn


Unterschiedliche Perl-Versionen auf Windows (fast wie perlbrew) • Meine Perl-Artikel

View full thread [LWP::UserAgent] "Ein nicht blockierender Socketvorgang konnte nicht sofort ausgeführt werden" (Perl 5.18 64bit)