Your IP : 216.73.216.196


Current Path : /opt/alt/python37/lib64/python3.7/Tools/demo/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/Tools/demo/__pycache__/rpythond.cpython-37.opt-1.pyc

B

� 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�}|�d|f�|�	d�xd|�
�\}\}}td||�d}x|�t
�}|sxP||7}qhWt|���}|�|���|��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/python37/lib64/python3.7/Tools/demo/rpythond.py�mains$

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