# TELOPT characters
EXTEND_ASCII = chr(17) # '%c' % 17
TERMTYPE = chr(24) # "%c" % 24
NAWS = chr(31) # "%c" % 32
MSDP = chr(69) #'E' # "%c" % 69
MSSP = chr(70) #'F' # "%c" % 70
MSP = chr(90) # '%c' % 90
ATCP = chr(200) # '%c' % 200
MCCP1 = chr(85)
MCCP2 = chr(86)
# Handshakes
server_will_extend_ascii = telnet.IAC + telnet.WILL + EXTEND_ASCII
server_wont_extend_ascii = telnet.IAC + telnet.WONT + EXTEND_ASCII
client_do_extend_ascii = telnet.IAC + telnet.DO + EXTEND_ASCII
client_dont_extend_ascii = telnet.IAC + telnet.DONT + EXTEND_ASCII
server_will_termtype = telnet.IAC + telnet.WILL + TERMTYPE
server_wont_termtype = telnet.IAC + telnet.WONT + TERMTYPE
server_do_termtype = telnet.IAC + telnet.DO + TERMTYPE
server_dont_termtype = telnet.IAC + telnet.DONT + TERMTYPE
client_will_termtype = telnet.IAC + telnet.WILL + TERMTYPE
client_wont_termtype = telnet.IAC + telnet.WONT + TERMTYPE
client_do_termtype = telnet.IAC + telnet.DO + TERMTYPE
client_dont_termtype = telnet.IAC + telnet.DONT + TERMTYPE
server_do_naws = telnet.IAC + telnet.DO + NAWS
server_dont_naws = telnet.IAC + telnet.DONT + NAWS
client_will_naws = telnet.IAC + telnet.WILL + NAWS
client_wont_naws = telnet.IAC + telnet.WONT + NAWS
server_will_msdp = telnet.IAC + telnet.WILL + MSDP
server_wont_msdp = telnet.IAC + telnet.WONT + MSDP
client_do_msdp = telnet.IAC + telnet.DO + MSDP
client_dont_msdp = telnet.IAC + telnet.DONT + MSDP
server_will_mssp = telnet.IAC + telnet.WILL + MSSP
server_wont_mssp = telnet.IAC + telnet.WONT + MSSP
client_do_mssp = telnet.IAC + telnet.DO + MSSP
client_dont_mssp = telnet.IAC + telnet.DONT + MSSP
server_will_msp = telnet.IAC + telnet.WILL + MSP
server_wont_msp = telnet.IAC + telnet.WONT + MSP
client_do_msp = telnet.IAC + telnet.DO + MSP
client_dont_msp = telnet.IAC + telnet.DONT + MSP
server_do_atcp = telnet.IAC + telnet.WILL + ATCP
server_dont_atcp = telnet.IAC + telnet.WONT + ATCP
client_will_atcp = telnet.IAC + telnet.DO + ATCP
client_wont_atcp = telnet.IAC + telnet.DONT + ATCP
server_will_mccp1 = telnet.IAC + telnet.WILL + MCCP1
server_wont_mccp1 = telnet.IAC + telnet.WONT + MCCP1
client_do_mccp1 = telnet.IAC + telnet.DO + MCCP1
client_dont_mccp1 = telnet.IAC + telnet.DONT + MCCP1
server_will_mccp2 = telnet.IAC + telnet.WILL + MCCP2
server_wont_mccp2 = telnet.IAC + telnet.WONT + MCCP2
client_do_mccp2 = telnet.IAC + telnet.DO + MCCP2
client_dont_mccp2 = telnet.IAC + telnet.DONT + MCCP2
[…]
# ——————————————————————————
# Function: will_negotiation_hook
# We have recieved a connection, so lets see what protocols they support.
def will_negotiation_hook(info):
sock, = parse_hook(info)
sock.send_raw(server_will_extend_ascii)
# sock.send_raw(server_will_termtype)
sock.send_raw(server_do_termtype)
# sock.send_raw(server_do_naws)
sock.send_raw(server_will_mssp)
sock.send_raw(server_will_msdp)
sock.send_raw(server_will_msp)
sock.send_raw(server_do_atcp)
sock.push_ih(negotiating_wait_handler, acct_wait_negotiating_prompt)
The reply, for some context:
At the same time my state engine is also at fault if it's not "remembering" things, but Im at a loss as to why it's not.
Maya/Rudha