
    \d                     d    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e	j
                  ZdS )    N)ListOptionalUnion)
SSHCiphersSSHClientTransport)usagec                      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j                     ej        d ej                                        D             d           ej        d ej                                        D             d           ej        d ej        D             d          d ej                     ej        d           ej        dd          g           Zd! Zd" Zd# Zd$ Zd% Zd& Zd'S )(ConchOptions)userlNzLog in using this user name.)identityiN)cipherscN)macsmN)portpNz7Connect to this port.  Server must be on the same port.)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.)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))nox11xz+Disable X11 connection forwarding (default))agentAz&Enable authentication agent forwarding)noagentaz1Disable authentication agent forwarding (default))	reconnectrz2Reconnect to the server if the connection is lost.)r$   r&   c                 6    g | ]}|                                 S  decode.0r!   s     <lib/python3.11/site-packages/twisted/conch/client/options.py
<listcomp>zConchOptions.<listcomp>*   s     AAAAAA    zciphers to choose from)descrc                 6    g | ]}|                                 S r+   r,   r.   s     r0   r1   zConchOptions.<listcomp>.   s     >>>>>>r2   zmacs to choose fromc                 6    g | ]}|                                 S r+   r,   r.   s     r0   r1   zConchOptions.<listcomp>2   s     LLLLLLr2   z"host key algorithms to choose from)r   r   r   r   commandargumentT)r3   repeat)mutuallyExclusive
optActionsextraActionsc                 V    t          j        j        | g|R i | g | _        d | _        d S )N)r   Options__init__	identitysconns)selfargskws      r0   r>   zConchOptions.__init__?   s7    t1d111b111


r2   c                 :    | j                             |           dS )z&Identity for public-key authenticationN)r?   append)rA   r   s     r0   opt_identityzConchOptions.opt_identityD   s    a     r2   c                     |                     d          }|D ]'}|t          j        vrt          j        d|z             (|| d<   dS )zSelect encryption algorithms,zUnknown cipher type '%s'r   N)splitr   	cipherMapsysexit)rA   r   ciphers      r0   opt_cipherszConchOptions.opt_ciphersH   sT    --$$ 	> 	>FZ1113f<===!Yr2   c                     t          |t                    r|                    d          }|                    d          }|D ]'}|t          j        vrt          j        d|z             (|| d<   dS )zSpecify MAC algorithmsutf-8   ,zUnknown mac type '%r'r   N)
isinstancestrencoderI   r   macMaprK   rL   )rA   r   macs      r0   opt_macszConchOptions.opt_macsP   sw    dC   	(;;w''Dzz$ 	8 	8C*+++036777Vr2   c                     t          |t                    r|                    d          }|                    d          }|D ]'}|t          j        vrt          j        d|z             (|| d<   dS )zSelect host key algorithmsrP   rQ   zUnknown host key type '%r'r   N)rR   rS   rT   rI   r   supportedPublicKeysrK   rL   )rA   hkashkas      r0   opt_host_key_algorithmsz$ConchOptions.opt_host_key_algorithmsZ   s|    dC   	(;;w''Dzz$ 	= 	=C,@@@5;<<<&*"###r2   c                     t          |t                    r|                    d          }|                    d          | d<   dS )z/Choose how to authenticate to the remote serverrP   rQ   r   N)rR   rS   rT   rI   )rA   uass     r0   opt_user_authenticationsz%ConchOptions.opt_user_authenticationsd   s@    c3 	&**W%%C'*yy#$$$r2   N)__name__
__module____qualname__r   r   r   r   rS   int__annotations__optFlagsr   CompletionsCompleteUsernamesCompleteMultiListr   rJ   keysrU   r   rY   CompleteUserAtHost	CompletercompDatar>   rF   rN   rW   r\   r_   r+   r2   r0   r
   r
      s^         	<;;VVV888)))@@@SSS@@@<M4XeCHo678    	988000;;;EEE@@@MMMPPPH !u /0+E+--.u.AAZ%9%>%>%@%@AAA.   ,E+>>Z%6%;%;%=%=>>>+   $;5#:LL%7%KLLL:$ $ $
 
$ %E$&&EO),,,EO*T:::
'  H4  
! ! !" " "  + + +7 7 7 7 7r2   r
   )rK   typingr   r   r   twisted.conch.ssh.transportr   r   twisted.pythonr   r=   r
   r+   r2   r0   <module>rp      s    


 ( ( ( ( ( ( ( ( ( ( G F F F F F F F            \7 \7 \7 \7 \75= \7 \7 \7 \7 \7r2   