runtimepy.net.tcp.telnet package#
Submodules#
runtimepy.net.tcp.telnet.codes module#
Code enumerations relevant to the telnet (RFC 854) protocol.
- class runtimepy.net.tcp.telnet.codes.TelnetCode(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
IntEnumAn enumeration of byte values important to the telnet protocol.
- AO = 245#
- AYT = 246#
- BREAK = 243#
- DATA_MARK = 242#
- DO = 253#
- DONT = 254#
- EC = 247#
- EL = 248#
- GA = 249#
- IAC = 255#
- IP = 244#
- NOP = 241#
- SB = 250#
- SE = 240#
- WILL = 251#
- WONT = 252#
Module contents#
A module implementing a basic telnet (RFC 854) connection interface.
- class runtimepy.net.tcp.telnet.BasicTelnet(transport: Transport, protocol: QueueProtocol)[source]#
Bases:
TelnetA simple telnet implementation.
- async process_command(code: TelnetCode) None[source]#
Process a telnet command.
- async process_option(code: TelnetCode, option: int, _: BinaryIO) None[source]#
Process a telnet option.
- class runtimepy.net.tcp.telnet.Telnet(transport: Transport, protocol: QueueProtocol)[source]#
Bases:
TcpConnectionA class implementing a basic telnet interface.
- abstract async handle_nvt(action: TelnetNvt) None[source]#
Handle a signal for the network virtual-terminal.
- log_alias = 'TELNET'#
- abstract async process_command(code: TelnetCode) None[source]#
Process a telnet command.
- abstract async process_option(code: TelnetCode, option: int, stream: BinaryIO) None[source]#
Process a telnet option.
- async process_telnet_message(data: bytes) bool[source]#
By default, treat all incoming data bytes as text.
- send_command(code: TelnetCode) None[source]#
Send a telnet command.
- send_option(option: TelnetCode, code: int) None[source]#
Send a telnet option sequence. if the ‘SB’ is the desired code, the additional data can be sent using the ‘send_binary’ method directly.
- class runtimepy.net.tcp.telnet.TelnetCode(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
IntEnumAn enumeration of byte values important to the telnet protocol.
- AO = 245#
- AYT = 246#
- BREAK = 243#
- DATA_MARK = 242#
- DO = 253#
- DONT = 254#
- EC = 247#
- EL = 248#
- GA = 249#
- IAC = 255#
- IP = 244#
- NOP = 241#
- SB = 250#
- SE = 240#
- WILL = 251#
- WONT = 252#