1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use Net::FTPSSL;
my $ftps = Net::FTPSSL->new('SERVERNAME',
Port => 21,
Encryption => EXP_CRYPT,
Trace => 1,
Debug => 2
)
or die "Can't open ftp.yoursecureserver.com\n$Net::FTPSSL::ERRSTR";
$ftps->login('USER', 'PASSWORD')
or die "Can't login: ", $ftps->last_message();
$ftps->binary() or die "Can't change directory: " . $ftps->last_message();
$ftps->put("filezilla.log") or die "Can't get file: " . $ftps->last_message();
$ftps->get("mokmok.txt") or die "Can't get file: " . $ftps->last_message();
$ftps->quit();
1
2
3
Jan 22 08:06:12 SERVERNAME pure-ftpd: (?@xxx.xxx.xxx.xxx) [INFO] New connection from xxx.xxx.xxx.xxx
Jan 22 08:06:13 SERVERNAME pure-ftpd: (?@xxx.xxx.xxx.xxx) [INFO] SSL/TLS: Enabled TLSv1/SSLv3 with AES256-SHA, 256 secret bits cipher
Jan 22 08:06:13 SERVERNAME pure-ftpd: (?@xxx.xxx.xxx.xxx) [INFO] USER is now logged in
Jan 22 08:06:30 SERVERNAME pure-ftpd: (USER@xxx.xxx.xxx.xxx) [ERROR] SSL/TLS [/etc/ssl/private/pure-ftpd.pem]: error:00000000:lib(0):func(0):reason(0)
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
SKT <<< 220-Welcome to Pure-FTPd.
SKT <<< 220-You are user number 1 of 10 allowed.
SKT <<< 220-This is a private system - No anonymous login
SKT <<< 220-IPv6 connections are also welcome on this server.
SKT <<< 220 You will be disconnected after 15 minutes of inactivity.
SKT >>> AUTH TLS
SKT <<< 234 AUTH TLS OK.
>>> USER +++++++
<<< 331 User <++++++> OK. Password required
>>> PASS *******
<<< 230-User <++++++> has group access to: 100
<<< 230-This server supports FXP transfers
<<< 230 OK. Current directory is /
>>> TYPE I
<<< 200 TYPE is now 8-bit binary
>>> PBSZ 0
<<< 200 PBSZ=0
>>> PROT P
<<< 200 Data protection level set to "private"
>>> PASV
<<< 227 Entering Passive Mode (xxx,xxx,xxx,xxx,117,49)
--- Host (xxx.xxx.xxx.xxx) Port (30001)
>>> HELP
<<< 214-The following SITE commands are recognized
<<< ALIAS
<<< CHMOD
<<< IDLE
<<< UTIME
<<< 214 Pure-FTPd - http://pureftpd.org/
<<+ 502 Unknown command ALLO.
>>> STOR filezilla.log
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
use strict; use warnings; use Net::FTPSSL; my $host = 'debianserver'; my $ftps = Net::FTPSSL->new( $host, Port => 21, Encryption => EXP_CRYPT, Trace => 1, Debug => 3, ) or die "Can't open $host\n$Net::FTPSSL::ERRSTR"; $ftps->login( 'test', 'test' ) or die "Can't login: ", $ftps->last_message(); $ftps->binary() or die "Can't change directory: " . $ftps->last_message(); $ftps->put("filezilla.log") or die "Can't get file: " . $ftps->last_message(); $ftps->get("mokmok.txt") or die "Can't get file: " . $ftps->last_message(); $ftps->quit();
1
2
3
4
5
6
7
8
9
10
11
2013-01-17 13:50:55 4412 3 Befehl: AUTH TLS
2013-01-17 13:50:55 4412 3 Antwort: 234 AUTH TLS OK.
2013-01-17 13:50:55 4412 3 Status: Initialisiere TLS...
2013-01-17 13:50:55 4412 3 Status: Überprüfe Zertifikat...
2013-01-17 13:50:55 4412 3 Befehl: USER www
2013-01-17 13:50:55 4412 3 Status: TLS/SSL-Verbindung hergestellt.
2013-01-17 13:50:55 4412 3 Antwort: 331 User www OK. Password required
2013-01-17 13:50:55 4412 3 Befehl: PASS *********
2013-01-17 13:50:55 4412 3 Antwort: 230-User www has group access to: 100
2013-01-17 13:50:55 4412 3 Antwort: 230-This server supports FXP transfers
2013-01-17 13:50:55 4412 3 Antwort: 230 OK. Current directory is /
[ERROR] SSL/TLS [/etc/ssl/private/pure-ftpd.pem]: error:00000000:lib(0):func(0):reason(0)
[ERROR] SSL/TLS [/etc/ssl/private/pure-ftpd.pem]: error:00000000:lib(0):func(0):reason(0)