curl-and-python

Using PyCurl to connect to a FTP with TLSv1 ?

From: Stefan Schneider <stefan3003_at_googlemail.com>
Date: Thu, 21 Dec 2006 10:28:26 +0100

Hello,

I'm currently trying to fix a small Script for a Monitoring Solution,
all it basically has to do is to login to a System via FTP (using
TLSv1) and CWD to a defined directory.

At the command line i use:
curl --trace-ascii "output.log" -1 -k --ftp-ssl --connect-timeout 40
-l --max-time 50 -s -S --user MyUser:MyPass "ftp://MyFTPServer:2121"
-Q "CWD /backup/date/" -Q "PWD" -Q "QUIT"
Since i don't get a real status code back from the "CWD", i currently
grep in the "output.log" for "ailed" and by that decide if the test
was fine or not - which is pretty ugly i think :]

I googled for hours now and didn't find a piece of example code how i
may get this done clean in Python by using PyCurl, any Suggestions ? I
have to admit I'm pretty new to Python so any help on this would be
very appreciated :)

Cheers,
 Stefan
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2006-12-21