o
    ç÷¡g~  ã                   @   s.   d dl Zd dlZdZdd„ ZG dd„ dƒZdS )é    Nz\\.\pipe\openssh-ssh-agentc                     s4   t j t¡\} ‰ ˆ  ¡ ‰ t‡ fdd„t  | ¡D ƒƒS )Nc                 3   s   � | ]	}ˆ |  ¡ kV  qd S ©N)Úlower)Ú.0Ún©Úname© ú?/usr/local/lib/python3.10/dist-packages/paramiko/win_openssh.pyÚ	<genexpr>    s   € z$can_talk_to_agent.<locals>.<genexpr>)ÚosÚpathÚsplitÚ	PIPE_NAMEr   ÚanyÚlistdir)Údir_r   r   r	   Úcan_talk_to_agent   s   r   c                   @   s,   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	S )
ÚOpenSSHAgentConnectionc              
   C   s\   	 zt  tt jt jB ¡| _W d S  ty' } z|jdkr‚ W Y d }~nd }~ww t 	d¡ q)NTé   gš™™™™™¹?)
r   Úopenr   ÚO_RDWRÚO_BINARYÚ_pipeÚOSErrorÚerrnoÚtimeÚsleep)ÚselfÚer   r   r	   Ú__init__$   s   ú
ÿ€ý
özOpenSSHAgentConnection.__init__c                 C   ó   t  | j|¡S r   )r   Úwriter   )r   Údatar   r   r	   Úsend1   ó   zOpenSSHAgentConnection.sendc                 C   r    r   )r   Úreadr   )r   r   r   r   r	   Úrecv4   r$   zOpenSSHAgentConnection.recvc                 C   s   t  | j¡S r   )r   Úcloser   )r   r   r   r	   r'   7   s   zOpenSSHAgentConnection.closeN)Ú__name__Ú
__module__Ú__qualname__r   r#   r&   r'   r   r   r   r	   r   #   s
    r   )Úos.pathr   r   r   r   r   r   r   r   r	   Ú<module>   s
   	