[Twisted-Python] Need help using FTPClient

Hi. I am new to Twisted. I am using this code: http://twistedmatrix.com/documents/current/core/examples/ftpclient.py<http://twistedmatrix.com/documents/current/core/examples/ftpclient.py> Can this example be used to connect to an FTP through a SOCKS4/5 proxy? Can somebody provide an example of how it should be done? Thanks

On Dec 27, 2012, at 9:33 AM, Master Corp <corpmasters@gmail.com> wrote:
Hi. I am new to Twisted. I am using this code:
http://twistedmatrix.com/documents/current/core/examples/ftpclient.py
Can this example be used to connect to an FTP through a SOCKS4/5 proxy? Can somebody provide an example of how it should be done?
Is there any reason you want to use Twisted to do your SOCKS proxying? Programs like 'socksify' typically do what you need in a general way that does not require any awareness from your application. (Twisted does have a SOCKS implementation, but it's rarely worth the trouble to plug it in.) -glyph

I want to make a script that does some simple ftp tasks (using socks) on a list of severs. I thought twisted is a good choice. 2012/12/28 Glyph <glyph@twistedmatrix.com>
On Dec 27, 2012, at 9:33 AM, Master Corp <corpmasters@gmail.com> wrote:
Hi. I am new to Twisted. I am using this code:
Can this example be used to connect to an FTP through a SOCKS4/5 proxy? Can somebody provide an example of how it should be done?
Is there any reason you want to use Twisted to do your SOCKS proxying? Programs like 'socksify' typically do what you need in a general way that does not require any awareness from your application. (Twisted does have a SOCKS implementation, but it's rarely worth the trouble to plug it in.)
-glyph
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Well, sure; if you want your program to do the SOCKSing, Twisted has an implementation for that, so you *can*; Glyph is just suggesting that it may be easier to use Twisted only for the FTP-y bits, and rely on other software (such as socksify) to handle the SOCKS parts :) So, to rephrase the question: is there a reason you're not using an external app to do the SOCKS parts? On Fri, Dec 28, 2012 at 10:00 AM, Master Corp <corpmasters@gmail.com> wrote:
I want to make a script that does some simple ftp tasks (using socks) on a list of severs. I thought twisted is a good choice.
2012/12/28 Glyph <glyph@twistedmatrix.com>
On Dec 27, 2012, at 9:33 AM, Master Corp <corpmasters@gmail.com> wrote:
Hi. I am new to Twisted. I am using this code:
Can this example be used to connect to an FTP through a SOCKS4/5 proxy? Can somebody provide an example of how it should be done?
Is there any reason you want to use Twisted to do your SOCKS proxying? Programs like 'socksify' typically do what you need in a general way that does not require any awareness from your application. (Twisted does have a SOCKS implementation, but it's rarely worth the trouble to plug it in.)
-glyph
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-- cheers lvh

I want to store those proxies in a database and check their status ocasionaly 2012/12/28 Laurens Van Houtven <_@lvh.cc>
Well, sure; if you want your program to do the SOCKSing, Twisted has an implementation for that, so you *can*; Glyph is just suggesting that it may be easier to use Twisted only for the FTP-y bits, and rely on other software (such as socksify) to handle the SOCKS parts :)
So, to rephrase the question: is there a reason you're not using an external app to do the SOCKS parts?
On Fri, Dec 28, 2012 at 10:00 AM, Master Corp <corpmasters@gmail.com>wrote:
I want to make a script that does some simple ftp tasks (using socks) on a list of severs. I thought twisted is a good choice.
2012/12/28 Glyph <glyph@twistedmatrix.com>
On Dec 27, 2012, at 9:33 AM, Master Corp <corpmasters@gmail.com> wrote:
Hi. I am new to Twisted. I am using this code:
Can this example be used to connect to an FTP through a SOCKS4/5 proxy? Can somebody provide an example of how it should be done?
Is there any reason you want to use Twisted to do your SOCKS proxying? Programs like 'socksify' typically do what you need in a general way that does not require any awareness from your application. (Twisted does have a SOCKS implementation, but it's rarely worth the trouble to plug it in.)
-glyph
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-- cheers lvh
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

On Thu, Dec 27, 2012 at 11:48 PM, Glyph <glyph@twistedmatrix.com> wrote:
Is there any reason you want to use Twisted to do your SOCKS proxying? Programs like 'socksify' typically do what you need in a general way that does not require any awareness from your application. (Twisted does have a SOCKS implementation, but it's rarely worth the trouble to plug it in.)
Twisted does not have a SOCKS client, actually, only a server AFAIK. IIRC there's a 3rd party client library, but on github so therefore impossible to find.

OK, thank you for your help 2012/12/28 Itamar Turner-Trauring <itamar@futurefoundries.com>
On Thu, Dec 27, 2012 at 11:48 PM, Glyph <glyph@twistedmatrix.com> wrote:
Is there any reason you want to use Twisted to do your SOCKS proxying? Programs like 'socksify' typically do what you need in a general way that does not require any awareness from your application. (Twisted does have a SOCKS implementation, but it's rarely worth the trouble to plug it in.)
Twisted does not have a SOCKS client, actually, only a server AFAIK.
IIRC there's a 3rd party client library, but on github so therefore impossible to find.
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

On Fri, Dec 28, 2012 at 11:21 AM, Master Corp <corpmasters@gmail.com> wrote:
OK, thank you for your help
2012/12/28 Itamar Turner-Trauring <itamar@futurefoundries.com>
On Thu, Dec 27, 2012 at 11:48 PM, Glyph <glyph@twistedmatrix.com> wrote:
Is there any reason you want to use Twisted to do your SOCKS proxying? Programs like 'socksify' typically do what you need in a general way that does not require any awareness from your application. (Twisted does have a SOCKS implementation, but it's rarely worth the trouble to plug it in.)
Twisted does not have a SOCKS client, actually, only a server AFAIK.
IIRC there's a 3rd party client library, but on github so therefore impossible to find.
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
There is a SOCKS5 client in a Twisted ticket, but it hasn't been merged into trunk yet (for lack of tests IIRC). I don't know whether it still works, but it did at one time. Here's the ticket: http://twistedmatrix.com/trac/ticket/1330 -- Kevin Horn
participants (5)
-
Glyph
-
Itamar Turner-Trauring
-
Kevin Horn
-
Laurens Van Houtven
-
Master Corp