Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-04 Thread Patrick Mylund Nielsen
Hi Lee, You're welcome, although it seems I didn't solve your problem. I've tried running it on Linux (don't think it's significant) and connecting from Windows. It seems like Windows Telnet doesn't support it at all, and PuTTY's implementation is different: It negotiates, but doesn't actually ch

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-03 Thread Lee Orsino
Patrick, Thanks so much for that example, it was really helpful! I understand a little better about how the protocol works. I tested it on Linux, and it works just like you said. Perhaps not surprisingly I'm having some difficulty when running the server on Windows. When I do a self.will(chr(1))

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-03 Thread Patrick Mylund Nielsen
That's much better, Jean-Paul. Thanks! On Sat, Dec 3, 2011 at 15:48, wrote: > On 02:22 pm, twis...@patrickmylund.com wrote: >>Hi Lee, >> >>Here is a complete example that works with Twisted 11.0. LINEMODE >>itself is enabled at connect, but it has different modes that >>determine what is sent wh

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-03 Thread exarkun
On 02:22 pm, twis...@patrickmylund.com wrote: >Hi Lee, > >Here is a complete example that works with Twisted 11.0. LINEMODE >itself is enabled at connect, but it has different modes that >determine what is sent when by the client. (See section 2.2 of >http://www.faqs.org/rfcs/rfc1184.html) You can

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-03 Thread Patrick Mylund Nielsen
Pardon my double-posting. Here it is, a little less confusing: #!/usr/bin/env python from twisted.internet.protocol import Factory from twisted.conch.telnet import TelnetProtocol, TelnetTransport from twisted.conch.telnet import WILL # More info: http://www.faqs.org/rfcs/rfc1184.html LINEMODE =

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-03 Thread Patrick Mylund Nielsen
Hi Lee, Here is a complete example that works with Twisted 11.0. LINEMODE itself is enabled at connect, but it has different modes that determine what is sent when by the client. (See section 2.2 of http://www.faqs.org/rfcs/rfc1184.html) # #!/usr/bin/env python from twisted.internet.protocol

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-03 Thread exarkun
On 03:53 am, lmors...@gmail.com wrote: >Jean-Paul, > >Thanks for your response. I still can't get self.will(LINEMODE) to work >but >I did get self.telnet_WILL(LINEMODE) to run without throwing an Error. >Can >you elaborate on what needs to happen in the enableRemote? My >impression >was that onc

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-02 Thread Lee Orsino
Jean-Paul, Thanks for your response. I still can't get self.will(LINEMODE) to work but I did get self.telnet_WILL(LINEMODE) to run without throwing an Error. Can you elaborate on what needs to happen in the enableRemote? My impression was that once I send the negotiation WILL command from server t

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-02 Thread exarkun
On 2 Dec, 04:43 am, lmors...@gmail.com wrote: >Hmmm. Do I need to do something with the enableRemote/enableLocal >methods >of TelnetTransport? Yes. The default implementation of enableRemote does not allow any options to be enabled. You must override it if you want the peer to be allowed to e

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-01 Thread Lee Orsino
Hmmm. Do I need to do something with the enableRemote/enableLocal methods of TelnetTransport? ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-01 Thread Corbin Simpson
On Thu, Dec 1, 2011 at 5:34 PM, Jeffrey Ollie wrote: > On Thu, Dec 1, 2011 at 7:00 PM, Lee Orsino wrote: >> >>     reactor.listenTCP(8023, f) > > It's been a loong time since I've done anything with telnet, but it > used to be the case that telnet clients would not do any negotiation > if they co

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-01 Thread Lee Orsino
Yeah, unfortunately, same result on port 23:( On Thu, Dec 1, 2011 at 5:34 PM, Jeffrey Ollie wrote: > On Thu, Dec 1, 2011 at 7:00 PM, Lee Orsino wrote: > > > > reactor.listenTCP(8023, f) > > It's been a loong time since I've done anything with telnet, but it > used to be the case that

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-01 Thread Jeffrey Ollie
On Thu, Dec 1, 2011 at 7:00 PM, Lee Orsino wrote: > >     reactor.listenTCP(8023, f) It's been a loong time since I've done anything with telnet, but it used to be the case that telnet clients would not do any negotiation if they connected to non-standard ports. Have you tried running your serve

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-01 Thread Lee Orsino
Hi Patrick! Thanks for the suggestion. After I call self.will(LINEMODE), I get Failure: twisted.conch.telnet.OptionRefused: twisted.conch.telnet.OptionRefused: '"' So I know at least something is happening. I guess this just became a Telnet question instead of a twisted question. But I still don'

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-01 Thread Patrick Mylund Nielsen
For clarity, self.linemode has no special significance--it was just an easy way to keep track of what was negotiated with the client. On Fri, Dec 2, 2011 at 01:26, Patrick Mylund Nielsen wrote: > Hi Lee, > > Does using TelnetTransport 'will' and 'requestNegotation' work? E.g. > > self.will(LINEMO

Re: [Twisted-Python] Telnet negotiation with Twisted

2011-12-01 Thread Patrick Mylund Nielsen
Hi Lee, Does using TelnetTransport 'will' and 'requestNegotation' work? E.g. self.will(LINEMODE) self.requestNegotiation(LINEMODE, '') I'm not completely sure about LINEMODE, but if the client sends back a DO, you might use something like: class MyTransport(TelnetTransport): def connection