Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/paramiko/__pycache__/win_pageant.cpython-39.pyc
Ðазад
a s�hQ � @ s� d Z ddlZddlZddlZddlZddlmZ ddlm Z ddl Zddlm Z dZdZd Zd d� Zdd � Ze�� d dkr�ejZnejZG dd� dej�Zdd� ZG dd� d�ZdS )zP Functions for communicating with Pageant, the basic windows ssh agent program. � N)� zero_byte)�b� )�_winapil �P� i �J c C s t jj�dd�S )Ns Pageant)�ctypes�windll�user32ZFindWindowA� r r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/paramiko/win_pageant.py�_get_pageant_window_object+ s r c C s t t� �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 r r r r �can_talk_to_agent/ s r �64bitc @ s, e Zd ZdZdefdejjfdejfgZ dS )�COPYDATASTRUCTzy ctypes implementation of http://msdn.microsoft.com/en-us/library/windows/desktop/ms649010%28v=vs.85%29.aspx Znum_data� data_sizeZdata_locN) �__name__� __module__�__qualname__�__doc__� ULONG_PTRr ZwintypesZDWORDZc_void_pZ_fields_r r r r r ? s �r c C s� t � }|sdS dt�� d��}t�|tt�� �}|�� |�| � t�dt |�t �}|�� \}}tt ||�}tjj�|tt�|�t�|��}|dkr�|�d� |�d�} t�d| �d } | |�| � W d � S W d � dS 1 s�0 Y dS )za Communication with the Pageant process is done through a shared memory-mapped file. NZPageantRequest�08xr r � z>I)r �thread� get_identr Z MemoryMap�_AGENT_MAX_MSGLENZ get_security_attributes_for_user�write�arrayr r �buffer_infor �_AGENT_COPYDATA_IDr r r ZSendMessageA�win32con_WM_COPYDATAZsizeofZbyref�seek�read�struct�unpack)�msgZhwndZmap_nameZpymapZchar_bufferZchar_buffer_addressZchar_buffer_sizeZcds�responseZdatalenZretlenr r r �_query_pageantL s. � �� r'