HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/twisted/tap/__pycache__/ftp.cpython-38.pyc
U


W[��@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)Zdescr)Z
optActionscOs&tjj|f|�|�|�t���dS)N)rr
�__init__�
addCheckerrZAllowAnonymousAccess)�self�a�kw�r�1/usr/lib/python3/dist-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-fileZTwisted��r�)�category�
stacklevelT)�cacheN)rZgetDeprecationWarningString�opt_password_filer	ZVersion�warnings�warn�DeprecationWarningrrZFilePasswordDB)r�filename�msgrrrr)s�zOptions.opt_password_fileN)�__name__�
__module__�__qualname__ZsynopsisZ
optParametersrZCompletionsZCompleteDirsZcompDataZlongdescrrrrrrr
s


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


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