Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib64/python3.7/site-packages/twisted/tap/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/site-packages/twisted/tap/__pycache__/ftp.cpython-37.pyc

B

;��]��@sndZddlmZddlmZmZmZddlmZddl	m
Z
mZmZddl
Z
Gdd�de
jej�Zd	d
�ZdS)z>
I am the support module for making a ftp server with twistd.
�)�internet)�portal�checkers�strcred)�ftp)�usage�	deprecate�versionsNc@s^eZdZdZddddgdddd	gd
ddd
ggZejdejdd�id�ZdZ	dd�Z
dd�ZdS)�OptionszP[options].
    WARNING: This FTP server is probably INSECURE do not use it.
    �port�pZ2121zset the port number�root�rz/usr/local/ftpz define the root of the ftp-site.�
userAnonymous�Z	anonymouszName of the anonymous user.zroot of the ftp site)�descr)Z
optActionscOs&tjj|f|�|�|�t���dS)N)rr
�__init__�
addCheckerrZAllowAnonymousAccess)�self�a�kw�r�B/opt/alt/python37/lib64/python3.7/site-packages/twisted/tap/ftp.pyr$szOptions.__init__c	CsJ||d<t�|jt�dddd��}tj|tdd�|�t	j
|dd	��d
S)z�
        Specify a file containing username:password login info for
        authenticated connections. (DEPRECATED; see --help-auth instead)
        z
password-file�Twisted��r�)�category�
stacklevelT)�cacheN)rZgetDeprecationWarningString�opt_password_filer	�Version�warnings�warn�DeprecationWarningrrZFilePasswordDB)r�filename�msgrrrr )s
zOptions.opt_password_fileN)�__name__�
__module__�__qualname__ZsynopsisZ
optParametersrZCompletionsZCompleteDirsZcompDataZlongdescrr rrrrr
s

r
cCs�t��}t�|d�}t�||�dg��}|d|_|d|_||_tj|_	yt
|d�}Wntk
rtd}YnXt�
||�S)Nr
ZcredCheckersrriI)rZ
FTPFactoryZFTPRealmrZPortal�getZtldrZFTPZprotocol�int�KeyErrorrZ	TCPServer)�config�frrZportnorrr�makeService6s


r/)�__doc__Ztwisted.applicationrZtwisted.credrrrZtwisted.protocolsrZtwisted.pythonrrr	r"r
ZAuthOptionMixinr/rrrr�<module>s"