%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/paramiko/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/paramiko/__pycache__/win_pageant.cpython-312.pyc

�

�ec���2�dZddlZddlZddlZddlZddlmZddlm	Z		ddl
Zddl
mZdZdZd	Zd
�Zd�Zej(�ddk(r
ej*Znej.ZGd
�dej0�Zd�ZGd�de�Zy#e$rddlZY�qwxYw)zP
Functions for communicating with Pageant, the basic windows ssh agent program.
�N)�	zero_byte)�b�)�_winapil�P�i �Jc�V�tjjjdd�S)NsPageant)�ctypes�windll�user32�FindWindowA���6/usr/lib/python3/dist-packages/paramiko/win_pageant.py�_get_pageant_window_objectr.s���=�=���+�+�J�
�C�Crc�(�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.
    )�boolrr
rr�can_talk_to_agentr2s���*�,�-�-r�64bitc�b�eZdZdZdefdejjfdejfgZ	y)�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_r
rrrrBs6���
�Y��	�f�o�o�+�+�,�	�V�_�_�%��Hrrc	���t�}|sydtj�z}tj|t
tj��}|5|j|�tjdt|�tz�}|j�\}}tt||�}tjj j#|t$tj&|�tj(|��}|dkDrX|j+d�|j-d�}	t/j0d|	�d}
|	|j-|
�zcddd�S	ddd�y#1swYyxYw)za
    Communication with the Pageant process is done through a shared
    memory-mapped file.
    NzPageantRequest%08xrr�z>I)r�thread�	get_identr�	MemoryMap�_AGENT_MAX_MSGLEN� get_security_attributes_for_user�write�arrayrr�buffer_infor�_AGENT_COPYDATA_IDr	r
r�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�retlens           r�_query_pageantrAOs=��
&�'�D���$�f�&6�&6�&8�8�H�����#�W�%M�%M�%O�
�E�
��
���C���k�k�#�q��{�Y�'>�?��0;�0G�0G�0I�-��-��� 0�2E�
���=�=�'�'�4�4��&��
�
�c�(:�F�L�L��<M�
���a�<��J�J�q�M��j�j��m�G��]�]�4��1�!�4�F��U�Z�Z��/�/�%��&�'���s�DE-�#E-�-E6c�(�eZdZdZd�Zd�Zd�Zd�Zy)�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.
    c��d|_y�N��	_response��selfs r�__init__zPageantConnection.__init__}s	����rc�$�t|�|_yrE)rArG)rI�datas  r�sendzPageantConnection.send�s��'��-��rc��|j�y|jd|}|j|d|_|jdk(rd|_|S)N�rF)rI�n�rets   r�recvzPageantConnection.recv�sI���>�>�!���n�n�R�a� �������+����>�>�R��!�D�N��
rc��yrEr
rHs r�closezPageantConnection.close�s��rN)rrrrrJrMrRrTr
rrrCrCus����.��
rrC)rr+�ctypes.wintypesr	�platformr4�paramiko.commonr�paramiko.py3compatr�_threadr%�ImportErrorrOrr-r(r/rr�architecture�c_uint64r�c_uint32�	StructurerrA�objectrCr
rr�<module>r`s���(�
���
�%� ���� ������D�.��8����1���(����I����I�
�V�%�%�
�#�L
��
��i����s�B
�
	B�B

Zerion Mini Shell 1.0