History
- 4.0.3
bugfix: long-running servers leaked memory through
Server_protocolslist and_new_clientasyncio.Queue. Both are now bounded and regularly pruned.enhancement:
telnetlib3.telnetnow overlays std library module space,import telnetlib#139.enhancement:
telnetlib3-fingerprint-serverandtelnetlib3-fingerprintclient now also detect “telnet loops” and “wrong direction” errors in opposing IAC parser.removed:
telnetlib3-fingerprint-serverno longer integrates with the (never released)tv-detectpackage for terminal vulnerability probing.
- 4.0.2
bugfix: MCCP2 decompression failed on MUD servers using raw deflate or gzip-wrapped compression, producing garbled banners. The client now auto-detects zlib/gzip format and falls back to raw deflate when needed.
bugfix:
NEW_ENVIRON SENDrequests that exceed the 256-byte subnegotiation buffer of some telnet clients (e.g. GNU inetutils) are now automatically split into multiple SB frames.bugfix:
telnetlib3-serverargument--tls-autodeadlocked with plain telnet clients. Detection now uses a non-blocking with a configurable timeout.enhancement:
writer.get_extra_info("ssl_object")is available in shell callbacks to detect TLS-secured connections and query the negotiated protocol version and cipher.enhancement:
telnetlib3-fingerprint-serverintegrates with the optionaltv-detectpackage for terminal vulnerability probing.
- 4.0.1
new:
--encoding=big5bbs, BBS 半形字 (half-width characters) encoding, matching PCMan/PttBBS terminal clients, popular with Taiwanese BBS culture.enhancement:
telnetlib3-clientnow works on Windows by using the optionalblessed>=1.20dependency, installed automatically for Windows platforms.bugfix:
telnetlib3-clientcould begin a shell in wrong ECHO mode, depending on order of options in a “connection burst”.bugfix:
TelnetSessionContextgmcp_datamutable default argument caused all instances to share a single dict, so GMCP data from one connection contaminated subsequent connections.bugfix: keyboard escape detection raised
UnicodeDecodeErroron non-UTF-8 terminal input bytes; now useserrors="replace".
- 4.0.0
removed:
telnetlib3.color_filter.ColorFilter,ColorConfig,PALETTES,PetsciiColorFilter, andAtasciiControlFilterhave all been moved to the downstream Telix project, recommended for connecting to legacy BBSs systems requiring color correction.telnetlib3-clientCLI args--colormatch,--color-brightness,--color-contrast,--background-color,--ice-colorsremoved.
- 3.0.3
bugfix: server and client now correctly complete LINEMODE negotiation when prompted to.
new:
--logfile-mode {append,rewrite}and--typescript-modeCLI flags andmake_logger()filemodeargument control whether the log file is appended to (default) or overwritten on each connection.new:
LinemodeBufferused bytelnetlib3-client, a client-side line buffer for LINEMODE EDIT mode with local erase-char, erase-line, erase-word editing, forwardmask flushing, and TRAPSIG IAC command generation. The default ‘telsh’ server was also updated to support linemode.
- 3.0.2
bugfix:
request_charset()raisedTypeError, #128. Offer callbacks (no-arg, returning a list of items to propose) are now separated from send callbacks (which respond to received requests) via newset_ext_offer_callback()method.
- 3.0.1
change: Unused client argument
gmcp_logremoved.new: MCCP2 and MCCP3. Both client and server ends passively support if requested, and request support by –compression or deny support by –no-compression.
new:
on_request_charset()andon_request_environ()offer callbacks on the client, symmetric with the existing server-side callbacks.
- 3.0.0
change:
connect_minwaitdefault now 0 (was 1.0 seconds in library API).change:
force_binaryauto-enabled when CHARSET is negotiated (RFC 2066) orLANG/CHARSETreceived via NEW_ENVIRON (RFC 1572). SyncTERM font detection also enables it unconditionally.change:
--connect-timeoutdefault changed from no limit to 10 seconds.change:
--reverse-videoCLI option from 2.4.0 was removed.change: CGA, EGA, and Amiga palettes removed from
--colormatch; onlyvgais available at this time.ice_colorsare now True by default.bugfix:
read_some()in synchronous API (TelnetConnectionandServerConnection) blocked until EOF instead of returning available data. Now returns as soon as any data is available.new:
TelnetSessionContextbase class andwriter.ctxattribute for per-connection session state. Subclass to add application-specific attributes (e.g. MUD client state).new:
--ice-colors(default on) treats SGR 5 (blink) as bright background for proper 16-color BBS/ANSI art display.new:
--typescript FILErecords session output to a file, similar to the Unixscript(1)command.new: shared
TelnetProtocolBasemixin extracted from duplicated server and client protocol code.new:
_atomic_json_write()and_BytesSafeEncoderhelpers in_pathsmodule for fingerprinting subsystem.enhancement: Microsoft Telnet (
telnet.exe) compatibility refined, server now sendsDO NEW_ENVIRONbut excludesUSERvariable instead of skipping the option entirely, #24.enhancement: comprehensive pylint and mypy cleanup across the codebase.
- 2.6.1
bugfix: dependency of
wcwidthversion.
- 2.6.0
new: TLS support (TELNETS).
open_connection()accepts an ssl parameter (True, or anssl.SSLContext).create_server()accepts an ssl parameter (ssl.SSLContext). New CLI options:--ssl,--ssl-cafile,--ssl-no-verifyfortelnetlib3-client;--ssl-certfile,--ssl-keyfile, and--tls-autofortelnetlib3-server.new: the default server shell now displays
Ready (secure: TLSv1.3).for TLS connections (the protocol version shown is negotiated dynamically).bugfix:
telnetlib3-clientnow sets terminal mode to the server’s preference viaWILL ECHOandWILL SGAnegotiation. Use--raw-modeto restore legacy raw mode for servers that don’t negotiate.bugfix:
telnetlib3-clientdeclines MUD protocol options (GMCP, MSDP, MSSP, MSP, MXP, ZMP, AARDWOLF, ATCP) by default. Use--always-door--always-willto opt in.bugfix: log output “staircase text” in raw terminal mode.
bugfix: graceful EOF handling, connection close no longer prints a traceback.
- 2.5.0
change:
telnetlib3-clientnow defaults to raw terminal mode (no line buffering, no local echo), which is correct for most servers. Use--line-modeto restore line-buffered local-echo behavior.change:
telnetlib3-server --pty-execnow defaults to raw PTY mode. Use--line-modeto restore cooked PTY mode with echo.change:
connect_minwaitdefault reduced to 0 acrossBaseClient,open_connection(), andtelnetlib3-client. Negotiation continues asynchronously. Use--connect-minwaitto restore a delay if needed, or usewait_for()in server or client shells to await a specific negotiation state.new: color, keyboard input translation, and
--encodingsupport for ATASCII (ATARI ASCII) and PETSCII (Commodore ASCII).new: SyncTERM/CTerm font selection sequence detection (
CSI Ps1 ; Ps2 SP D). Bothtelnetlib3-fingerprintandtelnetlib3-clientdetect font switching and auto-switch encoding to the matching codec (e.g. font 36 = ATASCII, 32–35 = PETSCII, 0 = CP437). Explicit--encodingtakes precedence.new:
TRACElog level (5, belowDEBUG) withhexdump()-style output for all sent and received bytes. Use--loglevel=trace.bugfix:
robot_check()now uses a narrow character (space) instead of a wide Unicode character, allowing retro terminal emulators to pass.bugfix: ATASCII codec now maps bytes 0x0D and 0x0A to CR and LF instead of graphics characters, fixing garbled output when connecting to Atari BBS systems.
bugfix: ATASCII codec normalizes CR and CRLF to the native ATASCII EOL (0x9B) during encoding, so the Return key works correctly.
bugfix: PETSCII bare CR (0x0D) is now normalized to CRLF in raw terminal mode and to LF in
telnetlib3-fingerprintbanners.bugfix:
telnetlib3-fingerprintre-encodes prompt responses for retro encodings so servers receive the correct EOL byte.bugfix:
telnetlib3-fingerprintno longer crashes withLookupErrorwhen the server negotiates an unknown charset. Banner formatting falls back tolatin-1.bugfix:
send_charset()normalizes non-standard encoding names (iso-8859-02toiso-8859-2,cp-1250tocp1250, etc.).enhancement:
telnetlib3-fingerprintresponds more like a terminal and to more y/n prompts about colors, encoding, etc. to collect more banners for the bbs.modem.xyz project.enhancement:
telnetlib3-fingerprintbanner formatting usessurrogateescapeerror handler, preserving raw high bytes (e.g. CP437 art) as surrogates instead of replacing them with U+FFFD.
- 2.4.0
new:
telnetlib3.color_filtermodule, translates 16-color ANSI SGR codes to 24-bit RGB from hardware palettes (EGA, CGA, VGA, xterm). Enabled by default. New client CLI options:--colormatch,--color-brightness,--color-contrast,--background-color,--reverse-video.new:
zmp_decode(),atcp_decode(), andaardwolf_decode()decode functions for ZMP (option 93), ATCP (option 200), and Aardwolf (option 102) MUD protocols.new:
handle_zmp(),handle_atcp(),handle_aardwolf(),handle_msp(), andhandle_mxp()callbacks for receiving MUD extended protocol subnegotiations, with accumulated data stored inzmp_data,atcp_data, andaardwolf_dataattributes.new: COM-PORT-OPTION (RFC 2217) subnegotiation parsing with
comport_dataattribute andrequest_comport_signature().enhancement:
telnetlib3-fingerprintnow always probes extended MUD options (MSP, MXP, ZMP, AARDWOLF, ATCP) during server scans and captures ZMP, ATCP, Aardwolf, MXP, and COM-PORT data in session output.enhancement:
telnetlib3-fingerprintsmart prompt detectionm auto-answers yes/no, color, UTF-8 menu,who, andhelpprompts.enhancement:
--banner-max-bytesoption fortelnetlib3-fingerprint; default raised from 1024 to 65536.new: ATASCII (Atari 8-bit) codec,
--encoding=atasciifor connecting to Atari BBS systems. Maps all 256 byte values to Unicode including graphics characters, card suits, and the inverse-video range (0x80–0xFF). ATASCII EOL (0x9B) maps to newline. Aliases:atari8bit,atari_8bit.enhancement:
--encoding=atascii,--encoding=petscii, and--encoding=ataristnow auto-enable--force-binaryfor both client and server, since these encodings use bytes 0x80–0xFF for standard glyphs.bugfix: rare LINEMODE ACK loop with misbehaving servers that re-send unchanged MODE without ACK.
bugfix: unknown IAC commands no longer raise
ValueError; treated as data.bugfix: client no longer asserts on
TTYPE ISfrom server.bugfix:
request_forwardmask()only called on server side.change:
wcwidthis now a required dependency.
- 2.3.0
bugfix: repeat “socket.send() raised exception.” exceptions.
bugfix: server incorrectly accepted
DO TSPEEDandDO SNDLOCwithWILLresponses. These are client-only options per RFC 1079 and RFC 779; the server now correctly rejects them.bugfix:
LINEMODE DO FORWARDMASKsubnegotiation no longer raisesNotImplementedError; the mask is accepted (logged only).bugfix: echo doubling in
--pty-execwithout--pty-raw(linemode).bugfix: missing
LICENSE.txtin sdist file.bugfix: GMCP, MSDP, and MSSP decoding now uses
--encodingwhen set, falling back tolatin-1for non-UTF-8 bytes instead of lossy replacement.bugfix:
NEW_ENVIRON SENDwith empty payload now correctly interpreted as “send all” per RFC 1572.new:
telnetlib3.mudmodule with encode/decode functions for GMCP (option 201), MSDP (option 69), and MSSP (option 70) MUD telnet protocols.new:
send_gmcp(),send_msdp(), andsend_mssp()methods for sending MUD protocol data, with correspondinghandle_gmcp(),handle_msdp(), andhandle_mssp()callbacks.new:
connect_timeoutparameter for client and--connect-timeoutCLI argument, #30.new:
telnetlib3-fingerprint-serverCLI with extendedNEW_ENVIRONfor fingerprinting of connected clients.new:
telnetlib3-fingerprintCLI for fingerprinting the given remote server, probing telnet option support and capturing banners.enhancement: reversed
WILL/DOfor directional options (e.g.WILL NAWSfrom server,DO TTYPEfrom client) now gracefully refused withDONT/WONTinstead of raisingValueError.enhancement:
NEW_ENVIRON SENDand response logging improved,SEND (all)/env send: (empty)instead of raw byte dumps.enhancement:
telnetlib3-fingerprintnow probes MSDP and MSSP options and captures MSSP server status data in session output.new:
--always-will,--always-do,--scan-type,--mssp-wait,--banner-quiet-time,--banner-max-waitoptions fortelnetlib3-fingerprint.
- 2.2.0
bugfix: workaround for Microsoft Telnet client crash on
SB NEW_ENVIRON SEND, #24. Server now defersDO NEW_ENVIRONuntil TTYPE cycling identifies the client, skipping it entirely for MS Telnet (ANSI/VT100).bugfix: handling of LINEMODE FORWARDMASK command bytes.
bugfix: SLC fingerprinting byte handling.
bugfix: send IAC GA (Go-Ahead) after prompts when SGA is not negotiated. Fixes hanging for MUD clients like Mudlet. PTY shell uses a 500ms idle timer. Use
--never-send-gato suppress like old behavior.performance: with smarter negotiation, default
connect_maxwaitreduced from 4.0s to 1.5s.performance: both client and server protocol
data_receivedmethods have approximately 50x throughput improvement in bulk data transfers.new:
Serverclass returned bycreate_server()withwait_for_client()method andclientsproperty for tracking connected clients.new:
wait_for()andwait_for_condition()methods for waiting on telnet option negotiation state.new:
telnetlib3.syncmodule with blocking (non-asyncio) APIs:TelnetConnectionfor clients,BlockingTelnetServerfor servers.new:
server_pty_shellmodule demonstratingtelnetlib3-server --pty-execCLI argument and related--pty-rawserver CLI option for raw PTY mode, used by most programs that handle their own terminal I/O.new:
guard_shellsmodule with--robot-checkand--pty-fork-limitCLI arguments for connection limiting and bot detection.new:
fingerprintingmodule for telnet client identification and capability probing.new:
--send-environclient CLI option to control which environment variables are sent via NEW_ENVIRON. Default no longer includes HOME or SHELL.
- 2.0.8
bugfix: object has no attribute
_extra, #100.
- 2.0.7
bugfix: respond WILL CHARSET with DO CHARSET.
- 2.0.6
bugfix: corrected CHARSET protocol client/server role behavior, #59.
bugfix: allow
--force-binaryand--encodingto be combined to prevent long “encoding failed after 4.00s” delays intelnetlib3-serverwith non-compliant clients, #74.bugfix: reduce
telnetlib3-clientconnection delay; session begins as soon as TTYPE and either NEW_ENVIRON or CHARSET negotiation is completed.bugfix: remove “‘NoneType’ object has no attribute ‘is_closing’” message on some types of closed connections.
bugfix: further improve
telnetlib3-clientperformance, capable of 11.2 Mbit/s or more.bugfix: more gracefully handle unsupported SB STATUS codes.
feature:
telnetlib3-clientnow negotiates terminal resize events.
- 2.0.5
feature: legacy
telnetlib.pyfrom Python 3.11 now redistributed; note change to projectLICENSE.txtfile.feature: add
readuntil_pattern(), #92 by agicy.feature: add
wait_closed()async method in response to #82.bugfix: README examples do not work, #81.
bugfix:
TypeError: buf expected bytes, got <class 'str'>on client timeout inTelnetServer, #87.bugfix: performance issues with client protocol under heavy load; demonstrating server
telnet://1984.wsnow documented in README.bugfix: annoying “socket.send() raised exception” repeating warning, #89.
bugfix: legacy use of
get_event_loop, #85.document: about encoding and
force_binaryin response to #90.feature: add tests to source distribution, #37.
test coverage increased by ~20%.
- 2.0.4
change: stop using setuptools library to get current software version.
- 2.0.3
bugfix:
NameErrorwhendebug=Trueis used withasyncio.run(), #75.
- 2.0.2
bugfix:
NameError: namesleepis not defined instream_writer.py.
- 2.0.1
bugfix: “write after close” is disregarded, caused many errors logged in
socket.send().bugfix: in
accessories.repr_mapping()about usingshlex.quote()on non-str,TypeError: expected string or bytes-like object, got 'int'.bugfix: about
fn_encodingusingrepr()onTelnetReaderUnicode.bugfix:
TelnetReader.is_closing()raisesAttributeError.deprecation:
close()andconnection_closed()emit warning; useat_eof()andfeed_eof()instead.deprecation: the
loopargument is no longer accepted byTelnetReader.enhancement: add Generic MUD Communication Protocol support, #63 by gtaylor.
change:
TelnetReaderandTelnetWriterno longer derive fromasyncio.StreamReaderandasyncio.StreamWriter; this fixes someTypeErrorin signatures and runtime.
- 2.0.0
change: support Python 3.9, 3.10, 3.11. Drop Python 3.6 and earlier. All code and examples have been updated to the new-style PEP-492 syntax.
change: the
loop,event_loop, andlogarguments are no longer accepted by any class initializers.note: this release has a known memory leak when using the
_waiter_connectedand_waiter_closedarguments to Client or Shell class initializers; please do not use them. A replacementwait_for_negotiationawaitable is planned for a future release.enhancement: add COM-PORT-OPTION subnegotiation support, #57 by albireox.
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
add Python 3.7 support, drop Python 3.4 and earlier, #33 by AndrewNelis.
- 1.0.0
First general release for standard API: instead of encouraging Twisted-like override of protocol methods, we provide a “shell” callback interface, receiving argument pairs (reader, writer).
- 0.5.0
bugfix: linemode MODE is now acknowledged.
bugfix: default stream handler sends 80 x 24 in cols x rows, not 24 x 80.
bugfix:
waiter_closedfuture on client defaulted to wrong type.bugfix: telnet shell (TelSh) no longer paints over final exception line.
- 0.4.0
bugfix: cannot connect to IPv6 address as client.
change:
TelnetClient.CONNECT_DEFEREDclass attribute renamedDEFERRED. Default value changed to 50ms from 100ms.change:
TelnetClient.waiterrenamed toTelnetClient.waiter_closed.enhancement:
TelnetClient.waiter_connectedfuture added.
- 0.3.0
bugfix: cannot bind to IPv6 address, #5.
enhancement: futures
waiter_connectedandwaiter_closedadded to server.change:
TelSh.feed_slcmerged intoTelSh.feed_byteasslc_functionkeyword.change:
TelnetServer.CONNECT_DEFEREDclass attribute renamedDEFERRED. Default value changed to 50ms from 100ms.enhancement: default
TelnetServer.PROMPT_IMMEDIATELY = Falseensures prompt is not displayed until negotiation is considered final. It is no longer “aggressive”.enhancement:
TelnetServer.pause_writingandresume_writingcallback wired.enhancement:
TelSh.pause_writingandresume_writingmethods added.
- 0.2.4
bugfix: pip installation issue, #8.
- 0.2
enhancement: various example programs were included in this release.
- 0.1
Initial release.