Hacked By AnonymousFox
�
�Q�f&[ � �� � d Z ddlZddlZddlZddlmZ ddlZ ej e d�� dgZ
dZdZ e
dg� Z e
d g� Z e
d
g� Z e
dg� Z e
dg� Z e
dg� Z e
d
g� Z e
dg� Z e
dg� Z e
dg� Z e
dg� Z e
dg� Z e
dg� Z e
dg� Z e
dg� Z e
dg� Z e
dg� Z e
dg� Z e
dg� Z e
dg� Z! e
dg� Z" e
dg� Z# e
dg� Z$ e
dg� Z% e
dg� Z& e
dg� Z' e
d g� Z( e
d!g� Z) e
d"g� Z* e
d#g� Z+ e
d$g� Z, e
d%g� Z- e
d&g� Z. e
d'g� Z/ e
d(g� Z0 e
d)g� Z1 e
d*g� Z2 e
d+g� Z3 e
d,g� Z4 e
d-g� Z5 e
dg� Z6 e
d.g� Z7 e
d/g� Z8 e
d0g� Z9 e
d1g� Z: e
d2g� Z; e
d3g� Z< e
d4g� Z= e
d5g� Z> e
d6g� Z? e
d7g� Z@ e
d8g� ZA e
d9g� ZB e
d:g� ZC e
d;g� ZD e
d<g� ZE e
d=g� ZF e
d>g� ZG e
d?g� ZH e
d@g� ZI e
dAg� ZJ e
dBg� ZK e
dCg� ZL e
dDg� ZM e
dEg� ZN e
dFg� ZO e
dGg� ZP e
dHg� ZQ e
dIg� ZR e
dJg� ZS e
dg� ZT e
dg� ZU eVedK� r
ej� ZXnej� ZX G dL� d� ZZdM� Z[e dNk( r e[� yy)OaQ TELNET client class.
Based on RFC 854: TELNET Protocol Specification, by J. Postel and
J. Reynolds
Example:
>>> from telnetlib import Telnet
>>> tn = Telnet('www.python.org', 79) # connect to finger port
>>> tn.write(b'guido\r\n')
>>> print(tn.read_all())
Login Name TTY Idle When Where
guido Guido van Rossum pts/2 <Dec 2 11:10> snag.cnri.reston..
>>>
Note that read_all() won't read until eof -- it just reads some data
-- but it guarantees to read at least one byte unless EOF is hit.
It is possible to pass a Telnet object to a selector in order to wait until
more data is available. Note that in this case, read_eager() may return b''
even if there was data on the socket, because the protocol negotiation may have
eaten the data. This is why EOFError is needed in some cases to distinguish
between "no data" and "connection closed" (since the socket also appears ready
for reading when it is closed).
To do:
- option negotiation
- timeout should be intrinsic to the connection object instead of an
option on one of the read calls only
� N)� monotonic)� �
)�remove�Telnet� � � � � � �� �� �� �� �� � � � � � � � � r � � � � � � �
� � r � � � � � � � � � � � � � � � � � � �! �"