Commit e72d76c1 authored by Guido van Rossum's avatar Guido van Rossum

Caolan McNamara:

telnetlib is unable to connect to a few telnet daemons because of
improper IAC handling, heres an attached oneliner to reject WILL
messages which will allow many more telnet daemons to work with it,
namely FreeBSD.
parent 2c614077
...@@ -329,6 +329,7 @@ class Telnet: ...@@ -329,6 +329,7 @@ class Telnet:
opt = self.rawq_getchar() opt = self.rawq_getchar()
self.msg('IAC %s %d', self.msg('IAC %s %d',
c == WILL and 'WILL' or 'WONT', ord(c)) c == WILL and 'WILL' or 'WONT', ord(c))
self.sock.send(IAC + DONT + opt)
else: else:
self.msg('IAC %s not recognized' % `c`) self.msg('IAC %s not recognized' % `c`)
except EOFError: # raised by self.rawq_getchar() except EOFError: # raised by self.rawq_getchar()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment