o
    Òó·iá  ã                   @   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.)Ú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))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   ó   g | ]}|  ¡ ‘qS © ©Údecode©Ú.0r   r'   r'   úbC:\Users\psant\Downloads\PAF backend\school\venv\Lib\site-packages\twisted/conch/client/options.pyÚ
<listcomp>)   ó    zConchOptions.<listcomp>zciphers to choose from)Údescrc                 C   r&   r'   r(   r*   r'   r'   r,   r-   -   r.   zmacs to choose fromc                 C   r&   r'   r(   r*   r'   r'   r,   r-   1   r.   z"host key algorithms to choose from)r	   r   r   r   Ú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,   r3   >   s   
zConchOptions.__init__c                 C   s   | j  |¡ dS )z&Identity for public-key authenticationN)r4   Úappend)r5   r   r'   r'   r,   Úopt_identityC   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)r5   r   Úcipherr'   r'   r,   Úopt_ciphersG   s   

€zConchOptions.opt_ciphersc                 C   óL   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Úencoder;   r   ÚmacMapr=   r>   )r5   r   Úmacr'   r'   r,   Úopt_macsO   ó   



€zConchOptions.opt_macsc                 C   rA   )zSelect host key algorithmsrB   rC   zUnknown host key type '%r'r   N)rD   rE   rF   r;   r   ÚsupportedPublicKeysr=   r>   )r5   ZhkasZhkar'   r'   r,   Úopt_host_key_algorithmsY   rJ   z$ConchOptions.opt_host_key_algorithmsc                 C   s&   t |tƒr
| d¡}| d¡| d< dS )z/Choose how to authenticate to the remote serverrB   rC   r   N)rD   rE   rF   r;   )r5   Zuasr'   r'   r,   Úopt_user_authenticationsc   s   

z%ConchOptions.opt_user_authenticationsN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   rE   ÚintÚ__annotations__ZoptFlagsr   ZCompletionsZCompleteUsernamesZCompleteMultiListr   r<   ÚkeysrG   r   rK   ZCompleteUserAtHostZ	CompleterZcompDatar3   r9   r@   rI   rL   rM   r'   r'   r'   r,   r      s^   
  öù
þþþö
ýí

r   )r=   Útypingr   r   r   Ztwisted.conch.ssh.transportr   r   Ztwisted.pythonr   r2   r   r'   r'   r'   r,   Ú<module>   s
   