Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 823eb4b

Browse files
committed
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.
1 parent ce33eb3 commit 823eb4b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Lib/telnetlib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ def process_rawq(self):
329329
opt = self.rawq_getchar()
330330
self.msg('IAC %s %d',
331331
c == WILL and 'WILL' or 'WONT', ord(c))
332+
self.sock.send(IAC + DONT + opt)
332333
else:
333334
self.msg('IAC %s not recognized' % `c`)
334335
except EOFError: # raised by self.rawq_getchar()

0 commit comments

Comments
 (0)