Your IP : 216.73.216.213


Current Path : /opt/alt/python36/lib64/python3.6/Tools/demo/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/Tools/demo/__pycache__/rpythond.cpython-36.pyc

3

� f�@sldZddlZddlmZmZmZddlZddlZdZdZdd�Z	dd	�Z
y
e	�Wnek
rfYnXdS)
z�
Remote python server.
Execute Python commands remotely and send output back.

WARNING: This version has a gaping security hole -- it accepts requests
from any host on the Internet!
�N)�socket�AF_INET�SOCK_STREAMiicCs�ttj�dkrttjd�}nt}ttt�}|jd|f�|j	d�xd|j
�\}\}}td||�d}x|jt
�}|sxP||7}qhWt|j��}|j|j��|j�qFWdS)N��zconnection from�)�len�sys�argv�int�PORTrrrZbindZlistenZaccept�printZrecv�BUFSIZE�execute�decode�send�encode�close)Zport�sZconnZ
remotehostZ
remoteport�request�dataZreply�r�8/opt/alt/python36/lib64/python3.6/Tools/demo/rpythond.py�mains$


rcCsjtj}tj}tj�t_t_}z2yt|ii�Wnt�tjd�YnXWd|t_|t_X|j	�S)N�d)
r	�stdout�stderr�io�StringIO�execr
�	traceback�	print_exc�getvalue)rrrZfakefilerrrr(sr)�__doc__r	rrrrr rrrr�KeyboardInterruptrrrr�<module>	s