[Twisted-Python] Telnet negotiation with Twisted

Patrick Mylund Nielsen twisted at patrickmylund.com
Sun Dec 4 18:57:22 EST 2011


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 change modes, e.g. send in real time rather than use
its own editing. Unfortunately I know next to nothing about these
clients' implementation of RFC 1184 (or lack thereof).

If you are willing to divulge a little more information about what you
are building, maybe someone can suggest a more suitable solution.
Perhaps a custom client is your best bet.

Best,
Patrick

On Sun, Dec 4, 2011 at 04:22, Lee Orsino <lmorsino at gmail.com> wrote:
> 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)) # set echo mode
>
> I get "DO 1" in return from the client. This is what I would expect. But
> when I do
>
> self.do(LINEMODE) # ask client to negotiate LINEMODE
>
> I get "WONT LINEMODE" in return. I get this with both clients I'm testing
> with. If I send "WILL LINEMODE" I get "DONT LINEMODE" in return.
>
> So it seems no matter what I do, my clients aren't willing to negotiate
> about this. I'm using the same code as the Linux server.
>
> Anyway, thanks for everyone's help so far...! At least it is working in
> Linux. Does anyone know if I have to do anything special for Windows? Can
> anyone confirm it doesn't work in Win 7? Maybe I am missing some
> configuration property, or...?
>
> Thanks!
> Lee
>
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>



More information about the Twisted-Python mailing list