AlkantarClanX12
Current Path : /lib64/python2.7/Demo/pysvr/ |
Current File : //lib64/python2.7/Demo/pysvr/pysvr.pyc |
� Afc @ s� d Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d Z d � Z d d � Z d � Z d � Z d � Z d � Z d d l m Z e � d S( sI A multi-threaded telnet-like server that gives a Python prompt. This is really a prototype for the same thing in C. Usage: pysvr.py [port] For security reasons, it only accepts requests from the current host. This can still be insecure, but restricts violations from people who can log in on your machine. Use with caution! i����Ni� c C s� yD t j t j d d � \ } } t | � d k rC t j d � n Wn t j k rf } t | � n Xx | D] \ } } qn W| r� y t j | d � } Wq� t k r� } t | � q� Xn t } t | � d S( Ni t s Too many arguments.i ( t getoptt syst argvt lent errort usaget stringt atoit ValueErrort PORTt main_thread( t optst argst msgt ot at port( ( s( /usr/lib64/python2.7/Demo/pysvr/pysvr.pyt main s c C s3 t j t _ | r | GHn d Gt Gt j d � d S( Ns i ( R t stderrt stdoutt __doc__t exit( R ( ( s( /usr/lib64/python2.7/Demo/pysvr/pysvr.pyR % s c C s� t j t j t j � } | j d | f � | j d � d G| Gd GHxm | j � \ } } | d | j � d k r� | j � d G| d Gd GHqH n t j t | | f � ~ ~ qH Wd S( NR i s Listening on ports ...i s'