HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib64/python3.10/site-packages/paramiko/__pycache__/win_pageant.cpython-310.pyc
o

�hQ�@s�dZddlZddlZddlZddlZddlmZddlm	Z	ddl
Zddlm
Z
dZdZd	Zd
d�Zdd
�Ze��ddkrBejZnejZGdd�dej�Zdd�ZGdd�d�ZdS)zP
Functions for communicating with Pageant, the basic windows ssh agent program.
�N)�	zero_byte)�b�)�_winapil�P�i �JcCstjj�dd�S)NsPageant)�ctypes�windll�user32�FindWindowA�rr�G/usr/local/CyberCP/lib/python3.10/site-packages/paramiko/win_pageant.py�_get_pageant_window_object+sr
cCs
tt��S)z�
    Check to see if there is a "Pageant" agent we can talk to.

    This checks both if we have the required libraries (win32all or ctypes)
    and if there is a Pageant currently running.
    )�boolr
rrrr�can_talk_to_agent/s
r�64bitc@s,eZdZdZdefdejjfdejfgZ	dS)�COPYDATASTRUCTzy
    ctypes implementation of
    http://msdn.microsoft.com/en-us/library/windows/desktop/ms649010%28v=vs.85%29.aspx
    �num_data�	data_size�data_locN)
�__name__�
__module__�__qualname__�__doc__�	ULONG_PTRr�wintypes�DWORD�c_void_p�_fields_rrrrr?s
�rc	Cs�t�}|sdSdt��d��}t�|tt���}|�Y|�|�t�dt	|�t
�}|��\}}tt
||�}tjj�|tt�|�t�|��}|dkrj|�d�|�d�}	t�d|	�d}
|	|�|
�Wd�S	Wd�dS1svwYdS)za
    Communication with the Pageant process is done through a shared
    memory-mapped file.
    N�PageantRequest�08xrr�z>I)r
�thread�	get_identr�	MemoryMap�_AGENT_MAX_MSGLEN� get_security_attributes_for_user�write�arrayrr�buffer_infor�_AGENT_COPYDATA_IDrrr	�SendMessageA�win32con_WM_COPYDATA�sizeof�byref�seek�read�struct�unpack)�msg�hwnd�map_name�pymap�char_buffer�char_buffer_address�char_buffer_size�cds�response�datalen�retlenrrr�_query_pageantLs2
�
��

�$�r=c@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�PageantConnectiona
    Mock "connection" to an agent which roughly approximates the behavior of
    a unix local-domain socket (as used by Agent).  Requests are sent to the
    pageant daemon via special Windows magick, and responses are buffered back
    for subsequent reads.
    cCs
d|_dS�N��	_response��selfrrr�__init__zs
zPageantConnection.__init__cCst|�|_dSr?)r=rA)rC�datarrr�send}szPageantConnection.sendcCs@|jdurdS|jd|�}|j|d�|_|jdkrd|_|S)N�r@)rC�n�retrrr�recv�s

zPageantConnection.recvcCsdSr?rrBrrr�close�szPageantConnection.closeN)rrrrrDrFrJrKrrrrr>rs	r>)rr'�ctypes.wintypesr�platformr0�paramiko.commonr�
paramiko.utilr�_threadr!rGrr)r$r+r
r�architecture�c_uint64r�c_uint32�	Structurerr=r>rrrr�<module>s(

&