cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: FTPS anyone?

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Tue, 2 Dec 2003 18:03:33 +0100

"Daniel Stenberg" <daniel-curl_at_haxx.se> said:

> curl --ftp-ssl ftp://server.com/
>
> ... which makes curl connect to a FTP server as normal, then issue the magic
> commands that "converts" it to a SSL-using connection.

That works until it's starting (or ending?) the transfer:

0000: PASV
0000: 227 Entering Passive Mode (195,56,193,26,128,18)
== Info: About to connect() to 195.56.193.26 port 32786
== Info: Connecting to cable-193-26.szhalomb.fibernet.bacs-net.hu (195.56.193.26) port 32786
== Info: Connected the data stream with PASV!
=> Send header, 8 bytes (0x8)
0000: TYPE I
<= Recv header, 20 bytes (0x14)
0000: 200 Type set to I.
=> Send header, 14 bytes (0xe)
0000: SIZE .bashrc
<= Recv header, 10 bytes (0xa)
0000: 213 1263
0000: RETR .bashrc
0000: 150 Opening BINARY mode SSL data connection for .bashrc (1263 bytes)

And in tethereal:

17:27:43.276320 10.0.0.6 -> 195.56.193.26 TCP 4841 > 32786 [SYN] Seq=843355619 Ack=0
17:27:43.370768 195.56.193.26 -> 10.0.0.6 TCP 32786 > 4841 [SYN, ACK] Seq=4009536879
17:27:43.370838 10.0.0.6 -> 195.56.193.26 TCP 4841 > 32786 [ACK] Seq=843355620 Ack=4
17:27:43.378584 10.0.0.6 -> 195.56.193.26 FTP Request: \027\003\001\000 \223\330t\36
17:27:43.488006 195.56.193.26 -> 10.0.0.6 FTP Response: \027\003\001\0000*\vq\2538$\
17:27:43.490018 10.0.0.6 -> 195.56.193.26 FTP Request: \027\003\001\000(@j\254F_\f|\
17:27:43.585590 195.56.193.26 -> 10.0.0.6 FTP Response: \027\003\001\000 3\316\230\3
17:27:43.587379 10.0.0.6 -> 195.56.193.26 FTP Request: \027\003\001\000(!=\353K\277\
17:27:43.715697 195.56.193.26 -> 10.0.0.6 FTP Response: \027\003\001\000`\205\323\25
17:27:43.924186 10.0.0.6 -> 195.56.193.26 TCP 4840 > 21 [ACK] Seq=842861119 Ack=4020
17:28:17.909968 10.0.0.6 -> 195.56.193.26 TCP 4841 > 32786 [RST] Seq=843355620 Ack=8
 I pressed ^C here.

It connects to his port 32786 okay, but the file isn't transferred AFAICS.
Hard to say because it's a tiny 1263 byte file.

Note the 195.56.193.26 machine didn't send a FIN. So maybe it is curl
who should close first?

--gv

-------------------------------------------------------
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
Received on 2003-12-02