Mudlet seems to fail TTYPE handshake if data compression is activated before TTYPE. Should resolve #512.
This commit is contained in:
parent
57144b2c21
commit
81aa43933c
2 changed files with 4 additions and 4 deletions
|
|
@ -32,10 +32,11 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
||||||
self.iaw_mode = False
|
self.iaw_mode = False
|
||||||
client_address = self.transport.client
|
client_address = self.transport.client
|
||||||
self.init_session("telnet", client_address, self.factory.sessionhandler)
|
self.init_session("telnet", client_address, self.factory.sessionhandler)
|
||||||
# negotiate mccp (data compression)
|
|
||||||
self.mccp = Mccp(self)
|
|
||||||
# negotiate ttype (client info)
|
# negotiate ttype (client info)
|
||||||
|
# Obs: mudlet ttype does not seem to work if we start mccp before ttype. /Griatch
|
||||||
self.ttype = ttype.Ttype(self)
|
self.ttype = ttype.Ttype(self)
|
||||||
|
# negotiate mccp (data compression) - turn this off for wireshark analysis
|
||||||
|
self.mccp = Mccp(self)
|
||||||
# negotiate mssp (crawler communication)
|
# negotiate mssp (crawler communication)
|
||||||
self.mssp = mssp.Mssp(self)
|
self.mssp = mssp.Mssp(self)
|
||||||
# msdp
|
# msdp
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,6 @@ class Ttype(object):
|
||||||
certain piece of information about the client. All data is
|
certain piece of information about the client. All data is
|
||||||
stored on protocol.protocol_flags under the TTYPE key.
|
stored on protocol.protocol_flags under the TTYPE key.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
options = self.protocol.protocol_flags.get('TTYPE')
|
options = self.protocol.protocol_flags.get('TTYPE')
|
||||||
|
|
||||||
if options and options.get('init_done') or self.ttype_step > 3:
|
if options and options.get('init_done') or self.ttype_step > 3:
|
||||||
|
|
@ -138,5 +137,5 @@ class Ttype(object):
|
||||||
self.protocol.protocol_flags['TTYPE'][option.upper()] = True
|
self.protocol.protocol_flags['TTYPE'][option.upper()] = True
|
||||||
|
|
||||||
self.protocol.protocol_flags['TTYPE']['init_done'] = True
|
self.protocol.protocol_flags['TTYPE']['init_done'] = True
|
||||||
#print "TTYPE final:", self.protocol.protocol_flags['TTYPE']
|
# print "TTYPE final:", self.protocol.protocol_flags['TTYPE']
|
||||||
self.ttype_step += 1
|
self.ttype_step += 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue