a
    )(b                     @   sN   d dl Z d dlmZmZmZ d dlmZmZ d dlm	Z	 G dd de	j
ZdS )    N)ListOptionalUnion)
SSHCiphersSSHClientTransport)usagec                   @   sN  e Zd ZU g dg dg dg dg dg dg dg dg d	g d
g
Zeeeeeef    e	d< g dg dg dg dg dg dg dgZ
ejdge ejdd ej D ddejdd ej D ddejdd ejD ddde ejddejddd gd!Zd"d# Zd$d% Zd&d' Zd(d) Zd*d+ Zd,d- Zd.S )/ConchOptions)userlNzLog in using this user name.)ZidentityiN)cipherscN)macsmN)ZportpNz7Connect to this port.  Server must be on the same port.)ZoptionoNzIgnored OpenSSH options)host-key-algorithms N)zknown-hostsr   NzFile to check for host keys)user-authenticationsr   Nz%Types of user authentications to use.)Zlogfiler   NzFile to log to, or - for stdoutoptParameters)versionVzDisplay version number only.)compressCzEnable compression.)logvz#Enable logging (defaults to stderr))Znox11xz+Disable X11 connection forwarding (default))agentAz&Enable authentication agent forwarding)noagentaz1Disable authentication agent forwarding (default))Z	reconnectrz2Reconnect to the server if the connection is lost.)r   r   c                 C   s   g | ]}|  qS  decode.0r   r"   r"   ;lib/python3.9/site-packages/twisted/conch/client/options.py
<listcomp>*       zConchOptions.<listcomp>zciphers to choose from)descrc                 C   s   g | ]}|  qS r"   r#   r%   r"   r"   r'   r(   .   r)   zmacs to choose fromc                 C   s   g | ]}|  qS r"   r#   r%   r"   r"   r'   r(   2   r)   z"host key algorithms to choose from)r	   r   r   r   ZcommandZargumentT)r*   repeat)ZmutuallyExclusiveZ
optActionsZextraActionsc                 O   s*   t jj| g|R i | g | _d | _d S )N)r   Options__init__	identitysZconns)selfargskwr"   r"   r'   r-   ?   s    zConchOptions.__init__c                 C   s   | j | dS )z&Identity for public-key authenticationN)r.   append)r/   r   r"   r"   r'   opt_identityD   s    zConchOptions.opt_identityc                 C   s8   | d}|D ]}|tjvrtd|  q|| d< dS )zSelect encryption algorithms,zUnknown cipher type '%s'r   N)splitr   	cipherMapsysexit)r/   r   Zcipherr"   r"   r'   opt_ciphersH   s
    

zConchOptions.opt_ciphersc                 C   sL   t |tr|d}|d}|D ]}|tjvr"td|  q"|| d< dS )zSpecify MAC algorithmsutf-8   ,zUnknown mac type '%r'r   N)
isinstancestrencoder5   r   macMapr7   r8   )r/   r   Zmacr"   r"   r'   opt_macsP   s    



zConchOptions.opt_macsc                 C   sL   t |tr|d}|d}|D ]}|tjvr"td|  q"|| d< dS )zSelect host key algorithmsr:   r;   zUnknown host key type '%r'r   N)r<   r=   r>   r5   r   supportedPublicKeysr7   r8   )r/   ZhkasZhkar"   r"   r'   opt_host_key_algorithmsZ   s    



z$ConchOptions.opt_host_key_algorithmsc                 C   s&   t |tr|d}|d| d< dS )z/Choose how to authenticate to the remote serverr:   r;   r   N)r<   r=   r>   r5   )r/   Zuasr"   r"   r'   opt_user_authenticationsd   s    

z%ConchOptions.opt_user_authenticationsN)__name__
__module____qualname__r   r   r   r   r=   int__annotations__ZoptFlagsr   ZCompletionsZCompleteUsernamesZCompleteMultiListr   r6   keysr?   r   rA   ZCompleteUserAtHostZ	CompleterZcompDatar-   r3   r9   r@   rB   rC   r"   r"   r"   r'   r      s\   
 



r   )r7   typingr   r   r   Ztwisted.conch.ssh.transportr   r   Ztwisted.pythonr   r,   r   r"   r"   r"   r'   <module>   s   