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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use v5.10; my $debug = defined; my $use_tls = defined; print "INC:\n".join("\n",@INC); print "\n\n"; print "Version Net::FTP::File: ".$Net::FTP::File::VERSION."\n"; print "Version Net::FTP: ".$Net::FTP::VERSION."\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 IO::Socket::SSL 2.012 qw(SSL_VERIFY_CLIENT_ONCE); if (defined $debug) {$IO::Socket::SSL::DEBUG = 3} use Net::FTP 3.05; use Net::FTP::File; my $ftp = Net::FTP->new( '*****', Debug => (defined $debug ? 1 : 0), Passive => 1, Timeout => 15, SSL_ca_file => 'test_ftp_zertifikat.pem', ) or die 'Fehler '.$@.' in '.__LINE__; if (defined $use_tls) { $ftp->starttls() or die "Fehler in ".__LINE__." wegen '$@'"; } $ftp->login('*****','*****') or die 'Fehler in '.__LINE__; if (!$ftp->isdir('/tmp')) { $ftp->mkdir('/tmp',1) or die 'Fehler in '.__LINE__; $ftp->site('CHMOD 0755 tmp') or die 'Fehler in '.__LINE__; } $ftp->cwd('/tmp') or die 'Fehler in '.__LINE__; my $hash_ref = $ftp->dir(); say "dir Ergebnis:\n".Dumper($hash_ref); $ftp->binary or die 'Fehler in '.__LINE__; for (my $z = 1; $z <= 40; $z ++) { say "\n\n\nDurchlauf $z:"; if ($ftp->isfile('testdatei.png')) { $ftp->delete('testdatei.png') or die 'Fehler in '.__LINE__; } if (!$ftp->isfile('testdatei.png')) { $ftp->put('test_ftp_datei.png','testdatei.png') or die 'Fehler in '.__LINE__; $ftp->site('CHMOD 0755 testdatei.png') or die 'Fehler in '.__LINE__; $hash_ref = $ftp->dir(); say "dir Ergebnis:\n".Dumper($hash_ref); $ftp->get('testdatei.png','test_ftp_datei.png') or die 'Fehler in '.__LINE__; say "dir Ergebnis:\n".Dumper($hash_ref); } else { say "Datei löschen fehlgeschlagen!"; } }
Quote#Durchlauf 30:
#Net::FTP=GLOB(0x2b993a8)>>> SIZE testdatei.png
#Net::FTP=GLOB(0x2b993a8)<<< 213 116770
#Net::FTP=GLOB(0x2b993a8)>>> PWD
#Net::FTP=GLOB(0x2b993a8)<<< 257 "/tmp" is the current directory
#Net::FTP=GLOB(0x2b993a8)>>> CWD testdatei.png
#Net::FTP=GLOB(0x2b993a8)<<< 550 testdatei.png: No such file or directory
#Net::FTP=GLOB(0x2b993a8)>>> CWD /tmp
#Net::FTP=GLOB(0x2b993a8)<<< 250 CWD command successful
#Net::FTP=GLOB(0x2b993a8)>>> PWD
#Net::FTP=GLOB(0x2b993a8)<<< 257 "/tmp" is the current directory
#Net::FTP=GLOB(0x2b993a8)>>> DELE testdatei.png
#Net::FTP=GLOB(0x2b993a8)<<< 250 DELE command successful
#Net::FTP=GLOB(0x2b993a8)>>> SIZE testdatei.png
#Net::FTP=GLOB(0x2b993a8)<<< 550 testdatei.png: No such file or directory
#Net::FTP=GLOB(0x2b993a8)>>> PWD
#Net::FTP=GLOB(0x2b993a8)<<< 257 "/tmp" is the current directory
#Net::FTP=GLOB(0x2b993a8)>>> CWD testdatei.png
#Net::FTP=GLOB(0x2b993a8)<<< 550 testdatei.png: No such file or directory
#Net::FTP=GLOB(0x2b993a8)>>> CWD /tmp
#Net::FTP=GLOB(0x2b993a8)<<< 250 CWD command successful
#Net::FTP=GLOB(0x2b993a8)>>> PWD
#Net::FTP=GLOB(0x2b993a8)<<< 257 "/tmp" is the current directory
#Net::FTP=GLOB(0x2b993a8)>>> PASV
#Net::FTP=GLOB(0x2b993a8)<<< 227 Entering Passive Mode (***,***,***,***,***,***).
#Net::FTP=GLOB(0x2b993a8)>>> STOR testdatei.png
#DEBUG: .../IO/Socket/SSL.pm:542: socket not yet connected
#DEBUG: .../IO/Socket/SSL.pm:544: socket connected
#DEBUG: .../IO/Socket/SSL.pm:566: ssl handshake not started
#DEBUG: .../IO/Socket/SSL.pm:599: using SNI with hostname *****
#DEBUG: .../IO/Socket/SSL.pm:634: request OCSP stapling
#DEBUG: .../IO/Socket/SSL.pm:653: set socket to non-blocking to enforce timeout=15
#DEBUG: .../IO/Socket/SSL.pm:667: Net::SSLeay::connect -> -1
#DEBUG: .../IO/Socket/SSL.pm:677: ssl handshake in progress
#DEBUG: .../IO/Socket/SSL.pm:687: waiting for fd to become ready: SSL wants a read first
#DEBUG: .../IO/Socket/SSL.pm:707: socket ready, retrying connect
#DEBUG: .../IO/Socket/SSL.pm:2505: did not get stapled OCSP response
#DEBUG: .../IO/Socket/SSL.pm:667: Net::SSLeay::connect -> 1
#DEBUG: .../IO/Socket/SSL.pm:722: ssl handshake done
#Net::FTP=GLOB(0x2b993a8)<<< 150 Opening BINARY mode data connection for testdatei.png
#DEBUG: .../IO/Socket/SSL.pm:1796: SSL read error
#Net::FTP: Net::Cmd::getline(): unexpected EOF on command channel: Bad file descriptor at C:/strawberry/perl/lib/Net/FTP/dataconn.pm line 82.
#Fehler in 52 at script.pl line 52.
#DEBUG: .../IO/Socket/SSL.pm:2635: free ctx 38268448 open=38268448
#DEBUG: .../IO/Socket/SSL.pm:2640: free ctx 38268448 callback
#DEBUG: .../IO/Socket/SSL.pm:2647: OK free ctx 38268448
QuoteThis 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.
2015-04-20T16:13:32 GwenDragonIst das ein interner FTP-Server bei dir im LAN?
2015-04-21T07:33:56 GwenDragonMeine Windows-Firewall sperrt da nix, da gehen auch schon mal 5000 Anfragen raus mit deinem Programm an meine lokalen und entfernten Server ohne Block.
2015-04-21T07:33:56 GwenDragonWas für eine benutzt du denn?
2015-04-21T07:33:56 GwenDragonHast du da besondere Einstellungen?
2015-04-21T07:33:56 GwenDragonVielleicht solltes du die Firewall mal zurücksetzen.
2015-04-20T16:13:32 GwenDragonPerl -V ist der Aufruf.
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
45
46
47
48
49
50
51
52
53
54
U:\>perl -V
Summary of my perl5 (revision 5 version 18 subversion 4) configuration:
Platform:
osname=MSWin32, osvers=6.3, archname=MSWin32-x64-multi-thread
uname='Win32 strawberry-perl 5.18.4.1 #1 Thu Oct 2 07:49:26 2014 x64'
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PE
RLIO -fno-strict-aliasing -mms-bitfields',
optimize='-s -O2',
cppflags='-DWIN32'
ccversion='', gccversion='4.7.3', gccosandvers=''
intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='long long', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='g++', ldflags ='-s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib"'
libpth=C:\strawberry\c\lib C:\strawberry\c\x86_64-w64-mingw32\lib C:\strawberry\c\lib\gcc\x86_64-w64-mingw32\4.7.3
libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lm
pr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32
-lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
libc=, so=dll, useshrplib=true, libperl=libperl518.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib"'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
PERLIO_LAYERS PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_SAWAMPERSAND
USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
Built under MSWin32
Compiled at Oct 2 2014 07:58:36
%ENV:
PERL_LWP_SSL_VERIFY_HOSTNAME="1"
@INC:
C:/strawberry/perl/site/lib
C:/strawberry/perl/vendor/lib
C:/strawberry/perl/lib
.
1
2
3
4
5
6
7
8
9
10
11
12
U:\> 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.
2015-04-26T07:49:20 GwenDragonda ich Kaspersky Antivirus verwende
2015-04-26T09:09:34 GwenDragonWarum sollte Essentials sicherer/vertrauensvoller sein?
2015-04-26T09:09:34 GwenDragonWelche AV-Herstellern vertraust du?