cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl-users Digest, Vol 16, Issue 11

From: <Matthew_Ivey_at_genpt.com>
Date: Tue, 12 Dec 2006 10:03:52 -0500

Ok, I've made some changes. It looks like the ports are being set
correctly.
However, I can't seem to pass data. the connection just sits after the STOR
command.

And yes the user /pass was changed. Thanks for the heads up.

C:\Temp>curl --ftp-ssl -u *******:******** --disable-epsv --upload-file
test.txt
  --use-ascii --trace-ascii teresa.out
ftp://onlinefiletransfer.suntrust.com:200
21
^C
C:\Temp>more teresa.out
== Info: About to connect() to onlinefiletransfer.suntrust.com port 20021
== Info: Trying 167.181.46.51... == Info: connected
== Info: Connected to onlinefiletransfer.suntrust.com (167.181.46.51) port
20021
0040: FTP server ready. Time = 09:57:46
=> Send header, 10 bytes (0xa)
0000: AUTH SSL
<= Recv header, 24 bytes (0x18)
0000: 234 AUTH TLS-P/SSL OK.

<= Recv header, 47 bytes (0x2f)
0000: 227 Entering Passive Mode (10,49,53,32,78,82)
== Info: Trying 10.49.53.32... == Info: connected
== Info: Connecting to 10.49.53.32 (10.49.53.32) port 20050
=> Send header, 8 bytes (0x8)
0000: TYPE A
<= Recv header, 20 bytes (0x14)
0000: 200 Type set to A.
=> Send header, 15 bytes (0xf)
0000: STOR test.txt

C:\Temp>

Matt Ivey
Genuine Parts Company
Phone: (770) 818-4695

                                                                           
                           curl-users
                           -request_at_c
                           ool.haxx.s To
                           e curl-users_at_cool.haxx.se
                           Sent by: cc
                           curl-users
                           -bounces_at_c Subject
                           ool.haxx.s curl-users Digest, Vol 16,
                           e Issue 11
                                                                           
                                                                           
                           12/12/2006
                           06:00 AM
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                    P
                                    l
                                    e
                                    a
                                    s
                                    e
                                    r
                                    e
                                    s
                                    p
                                    o
                                    n
                                    d
                                    t
                                    o
                                    c
                                    u
                                    r
                                    l
                                    -
                                    u
                                    s
                                    e
                                    r
                                    s
                                    @
                                    c
                                    o
                                    o
                                    l
                                    .
                                    h
                                    a
                                    x
                                    x
                                    .
                                    s
                                    e
                                                                           
                                                                           

Send curl-users mailing list submissions to
             curl-users_at_cool.haxx.se

To subscribe or unsubscribe via the World Wide Web, visit
             http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
or, via email, send a message with subject or body 'help' to
             curl-users-request_at_cool.haxx.se

You can reach the person managing the list at
             curl-users-owner_at_cool.haxx.se

When replying, please edit your Subject line so it is more specific
than "Re: Contents of curl-users digest..."

Today's Topics:

   1. Curl Newbie question (David Cook)
   2. (David Cook)
   3. Using Curl 7.16 on Windows-XP to get .CSV files over https
      connection (Mahesh Ramamurthy)
   4. Re: Curl Newbie question (Daniel Stenberg)
   5. Data Port connection with SSL/FTP (Matthew_Ivey_at_genpt.com)
   6. Re: Data Port connection with SSL/FTP (Daniel Stenberg)
   7. Re: Using Curl 7.16 on Windows-XP to get .CSV files over
      https connection (Daniel Stenberg)

----------------------------------------------------------------------

Message: 1
Date: Mon, 11 Dec 2006 11:01:21 -0600
From: David Cook <dcook_at_tcwonline.com>
Subject: Curl Newbie question
To: "'curl-users_at_cool.haxx.se'" <curl-users_at_cool.haxx.se>
Message-ID: <01C71D13.B32B1E00.dcook_at_tcwonline.com>
Content-Type: text/plain; charset="us-ascii"

I am trying to connect to a secure ftp ip using pasv, log in and then
send/receive files. I have tried a few things from the command line to no
avail. It is my understanding that curl is not interactive so I'm not sure

where to go from here. I have all the curl manuals and have reviewed them
but still no luck. What I am trying to do is:

1. Connect to a secure ftp ip address using a specific port using pasv.
2. Log in using with a user name and password.
3. Send all files from a specific unix directory on my system to a location

on the remote system.
4. Receive all files into a specific unix directory on my system from a
location on the remote system.
5. Get out.

I have tried a few things with curl and I am somewhat familiar with regular

ftp but I'm just not sure how to construct a curl command like this.

Any help would be greatly appreciated.

David

Email dcook_at_tcwonline.com

------------------------------

Message: 2
Date: Mon, 11 Dec 2006 11:21:11 -0600
From: David Cook <dcook_at_tcwonline.com>
To: "'curl-users_at_cool.haxx.se'" <curl-users_at_cool.haxx.se>
Message-ID: <01C71D16.770794A0.dcook_at_tcwonline.com>
Content-Type: text/plain; charset="us-ascii"

I am trying to connect to a secure ftp ip using pasv, log in and then
send/receive files. I have tried a few things from the command line to no
avail. It is my understanding that curl is not interactive so I'm not sure

where to go from here. I have all the curl manuals and have reviewed them
but still no luck. What I am trying to do is:
1. Connect to a secure ftp ip address using a specific port using
pasv.
2. Log in using with a user name and password.
3. Send all files from a specific unix directory on my system to
a location
on the remote system.
4. Receive all files into a specific unix directory on my system
from a
location on the remote system.
5. Get out.

I have tried a few things with curl and I am somewhat familiar with regular

ftp but I'm just not sure how to construct a curl command like this.
Any help would be greatly appreciated.
David
Email dcook_at_tcwonline.com

------------------------------

Message: 3
Date: Mon, 11 Dec 2006 17:19:12 -0500
From: "Mahesh Ramamurthy" <mahesh31_at_gmail.com>
Subject: Using Curl 7.16 on Windows-XP to get .CSV files over https
             connection
To: curl-users_at_cool.haxx.se
Message-ID:
             <768a81750612111419sf1d2283x75512b6f2f2a51c1_at_mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi All,

  I'm a novice in Curl. I currently have Curl 7.16.0 on my Windows-XP
machine. I need to download a .CSV file over a https connection.

  The command I use is

* curl -p proxy:port -o test.cvs **
https://LinkToThe* <https://LinkToTheSecureSite>*SecureSite<
https://LinkToThe>
*
**
The data contained in the CSV file on the Https server is being printed
correctly on the Command Window. The test.csv on my local drive just
contains the error message
**
*<html><h1>Internal SmartFilter error has occurred.<p>Please contact your
site administrator for further information.<p></h1></html>*
**
Is it an errror on one of networks (My network or the hosting network) or
I'm doing something wrong/missing anything.

Thank You for your help.

Regards,
Mahesh

**

--
Dream as if you'll live forever. Live as if you'll die today.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://cool.haxx.se/pipermail/curl-users/attachments/20061211/c84ee1b7/attachment.html
------------------------------
Message: 4
Date: Mon, 11 Dec 2006 23:24:13 +0100 (CET)
From: Daniel Stenberg <daniel_at_haxx.se>
Subject: Re: Curl Newbie question
To: the curl tool <curl-users_at_cool.haxx.se>
Message-ID: <Pine.LNX.4.64.0612112318110.16308_at_yvahk3.pbagnpgbe.fr>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Mon, 11 Dec 2006, David Cook wrote:
> I am trying to connect to a secure ftp ip
I hope "secure ftp ip" means FTP SSL? And even if it does, it can be either
explicit or implicit which actually makes two different syntaxes:
  curl --ftp-ssl ftp://host/
or
  curl ftps://host/
If it means SFTP, you'll need to build curl from CVS since it is still very
early support for that.
> using pasv
You don't login using pasv. PASV is used to setup the data transfer
connection, and is used by default by curl.
> log in and then send/receive files.
curl is designed to send/receive one file per URL, but you can specify any
amount of URLs on the command line. So, to upload many files you must
specific
all the files and their respective target URL on the command line.
> I have tried a few things from the command line to no avail.
I'm sure we can give better help and advice if you show us what you've
tried
(and failed) with.
> It is my understanding that curl is not interactive so I'm not sure where
to
> go from here.
> 3. Send all files from a specific unix directory on my system to a
location
> on the remote system.
curl doesn't have any feature that "send all" or similar. You'll have to
write
a script that'd gather all file names and pass them to curl for uploading.
> 4. Receive all files into a specific unix directory on my system from a
> location on the remote system.
Similarly, curl doesn't "Receive all" either but you'd need to first list
the
files of a particular dir and then request all of them, one by one by name.
--
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
------------------------------
Message: 5
Date: Mon, 11 Dec 2006 17:26:43 -0500
From: Matthew_Ivey_at_genpt.com
Subject: Data Port connection with SSL/FTP
To: curl-users_at_cool.haxx.se
Message-ID:
             <OF51FE8908.356F9323-ON85257241.007B0607-85257241.007
B4BEE_at_genpt.com>
Content-Type: text/plain; charset=US-ASCII
I'm trying to make a connection and pass Data on a certain port (range of
20050 - 20750).
Am I setting the up correctly, and what can I determine from the trace:
Curl Command:
C:\Temp>curl --ftp-ssl -u UCE0933A:1GNNPRTS --use-ascii --ftp-port -
--local-por
t 20049-20750 --trace-ascii teresa.out
ftp://onlinefiletransfer.suntrust.com:200
21//OFT0084
Trace:
== Info: About to connect() to onlinefiletransfer.suntrust.com port 20021
== Info:   Trying 167.181.46.51... == Info: Local port: 20049
== Info: connected
== Info: Connected to onlinefiletransfer.suntrust.com (167.181.46.51) port
20021
<= Recv header, 99 bytes (0x63)
0000: 220 <<<Connect:Enterprise UNIX 2.1.01 Secure FTP>>> at ga016w9f
0040: FTP server ready. Time = 14:11:19
=> Send header, 10 bytes (0xa)
0000: AUTH SSL
<= Recv header, 24 bytes (0x18)
0000: 234 AUTH TLS-P/SSL OK.
== Info: SSL: couldn't set callback!
== Info: successfully set certificate verify locations:
== Info:   CAfile: c:\messageway\curl\curl-ca-bundle.crt
  CApath: none
== Info: SSL connection using DES-CBC3-SHA
== Info: Server certificate:
== Info:         subject: /C=US/ST=Georgia/L=Atlanta/O=SunTrust
Bank/OU=GA016AF0
/CN=onlinefiletransfer.suntrust.com
== Info:         start date: 2006-04-21 17:25:59 GMT
== Info:         expire date: 2007-05-22 17:25:59 GMT
== Info:         common name: onlinefiletransfer.suntrust.com (matched)
== Info:         issuer: /C=US/O=Equifax/OU=Equifax Secure Certificate
Authority
== Info: SSL certificate verify ok.
=> Send header, 15 bytes (0xf)
0000: USER UCE0933A
<= Recv header, 37 bytes (0x25)
0000: 331 Password required for UCE0933A.
=> Send header, 15 bytes (0xf)
0000: PASS 1GNNPRTS
<= Recv header, 66 bytes (0x42)
0000: 230 Connect:Enterprise UNIX login ok, access restrictions apply.
=> Send header, 8 bytes (0x8)
0000: PBSZ 0
<= Recv header, 16 bytes (0x10)
0000: 200 PBSZ 0 OK.
=> Send header, 8 bytes (0x8)
0000: PROT P
<= Recv header, 46 bytes (0x2e)
0000: 200 PROT P OK, data channel will be secured.
=> Send header, 5 bytes (0x5)
0000: PWD
<= Recv header, 39 bytes (0x27)
0000: 257 "/UCE0933A" is current directory.
== Info: Entry path is '/UCE0933A'
== Info: Telling server to connect to 192.168.1.149:2521
=> Send header, 26 bytes (0x1a)
0000: PORT 192,168,1,149,9,217
<= Recv header, 30 bytes (0x1e)
0000: 200 PORT command successful.
== Info: Connect data stream actively
=> Send header, 8 bytes (0x8)
0000: TYPE A
<= Recv header, 20 bytes (0x14)
0000: 200 Type set to A.
=> Send header, 14 bytes (0xe)
0000: SIZE OFT0084
<= Recv header, 69 bytes (0x45)
0000: 550 Operation is not supported under Connect:Enterprise FTP serv
0040: er.
=> Send header, 14 bytes (0xe)
0000: RETR OFT0084
<= Recv header, 47 bytes (0x2f)
0000: 550 *** ERROR *** NO BATCHES FOR TRANSMISSION
== Info: RETR response: 550
== Info: Remembering we are in dir /
== Info: Connection #0 to host onlinefiletransfer.suntrust.com left intact
=> Send header, 6 bytes (0x6)
0000: QUIT
<= Recv header, 14 bytes (0xe)
0000: 221 Goodbye.
== Info: Closing connection #0
// Any  Information on this would be greatly appreciated.
Thanks,
Matt Ivey
------------------------------
Message: 6
Date: Mon, 11 Dec 2006 23:45:14 +0100 (CET)
From: Daniel Stenberg <daniel_at_haxx.se>
Subject: Re: Data Port connection with SSL/FTP
To: the curl tool <curl-users_at_cool.haxx.se>
Message-ID: <Pine.LNX.4.64.0612112333140.16308_at_yvahk3.pbagnpgbe.fr>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Mon, 11 Dec 2006, Matthew_Ivey_at_genpt.com wrote:
> I'm trying to make a connection and pass Data on a certain port (range of
> 20050 - 20750).
curl has no option to control what port number the data connection will
open
and listen to for the PORT command.
> C:\Temp>curl --ftp-ssl -u UCE0933A:1GNNPRTS --use-ascii --ftp-port -
> --local-port 20049-20750 --trace-ascii teresa.out
> ftp://onlinefiletransfer.suntrust.com:20021//OFT0084
This has two problems:
1) --local-port is the local end of all outgoing TCP connections. It is not
    the port number to use when it expects the server to connect back.
2) --ftp-port tells the server to use the default, which in your case seems
to
    pick a private network one which just can't be right.
> == Info: About to connect() to onlinefiletransfer.suntrust.com port 20021
> == Info:   Trying 167.181.46.51... == Info: Local port: 20049
See, it set a local port from your selected port range.
> == Info: Telling server to connect to 192.168.1.149:2521
> => Send header, 26 bytes (0x1a)
> 0000: PORT 192,168,1,149,9,217
192.168.* are private ones, so any external host will simply not be able to
reach you on that address.
Also, note that you have now published your user name and password to the
entire world, so I hope they were fakes or that you've already changed
them.
--
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
------------------------------
Message: 7
Date: Tue, 12 Dec 2006 09:42:28 +0100 (CET)
From: Daniel Stenberg <daniel_at_haxx.se>
Subject: Re: Using Curl 7.16 on Windows-XP to get .CSV files over
             https             connection
To: the curl tool <curl-users_at_cool.haxx.se>
Message-ID: <Pine.LNX.4.64.0612120940510.25715_at_yvahk3.pbagnpgbe.fr>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Mon, 11 Dec 2006, Mahesh Ramamurthy wrote:
> The command I use is
>
> *                                       curl -p proxy:port -o test.cvs **
> https://LinkToThe*
> <https://LinkToTheSecureSite>*SecureSite<https://LinkToThe>
Sorry, but your mail client really screwed that one up and it isn't really
possible for me to tell what you did. Can you try again (with a different
mail
client or a different setting somehow) ?
> The data contained in the CSV file on the Https server is being printed
> correctly on the Command Window. The test.csv on my local drive just
> contains the error message
It sounds like you gave two URLs and the first one is what gets redirected
to
the that file, and the second (the CSV file) is printed to stdout.
--
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
------------------------------
_______________________________________________
curl-users mailing list
curl-users_at_cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
End of curl-users Digest, Vol 16, Issue 11
******************************************
Received on 2006-12-12