AlkantarClanX12

Your IP : 3.144.41.200


Current Path : /usr/lib64/python2.7/Demo/threads/
Upload File :
Current File : //usr/lib64/python2.7/Demo/threads/telnet.pyc

�
��^c@s�ddlZddlZddlZddlTddlZd
Zed�Zed�Zed�Z	ed�Z
ed	�Zd
�Zd�Z
d�Ze�dS(i����N(t*iii�i�i�i�i�cCs�ttj�dkr5tjjd�tjd�ntjd}yt|�}Wn9tk
r�tjjtjdd�tjd�nXttj�dkr�tjd}nd}d|d ko�dknr�t|�}nHyt	|d�}Wn2tk
r/tjj|d	�tjd�nXt
tt�}y|j
||f�Wn7tk
r�}tjjd
|f�tjd�nXtjt|f�t|�dS(Nisusage: telnet hostname [port]
is: bad host name
ttelnett0t9ttcps: bad tcp service name
sconnect failed: %r
(tlentsystargvtstderrtwritetexitt
gethostbynameterrortevalt
getservbynametsockettAF_INETtSOCK_STREAMtconnecttthreadt	start_newtchildtparent(thostthostaddrtservnametporttstmsg((s+/usr/lib64/python2.7/Demo/threads/telnet.pytmains6

 
cCswd}d}xd|jt�\}}|sJtjjd�tjd�nd}x�|D]�}|r�t|�GH|j||�d}qW|r+d}|tkr�||}qN|t	t
fkr�|t	kr�dGndGtt}qN|ttfkr|tkrdGndGtt
}qNd	Gt|�GHqW|tkrDd}d
GqW||}qWWtj
j|�tj
j�qWdS(Nits(Closed by remote host)
is(DO)s(DONT)s(WILL)s(WONT)s	(command)s(IAC)(trecvfromtBUFSIZERRR	R
tordtsendtIACtDOtDONTtWONTtWILLtstdouttflush(Rtiactopttdatatdummyt	cleandatatc((s+/usr/lib64/python2.7/Demo/threads/telnet.pyRBsD
	


cCs1x*tjj�}|sPn|j|�qWdS(N(RtstdintreadlineR"(Rtline((s+/usr/lib64/python2.7/Demo/threads/telnet.pyRjs
i (RtosttimeRRR tchrR#R%R$R&R'RRR(((s+/usr/lib64/python2.7/Demo/threads/telnet.pyt<module>s$
	$	(