%PDF- %PDF-
Direktori : /proc/self/root/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/ |
Current File : //proc/self/root/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/win_pageant.pyc |
� ��Abc @ s! d Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z y d d l Z Wn e k r� d d l Z n Xd d l m Z d Z d Z d Z d � Z d � Z e j � d d k r� e j Z n e j Z d e j f d � � YZ d � Z d e f d � � YZ d S( sP Functions for communicating with Pageant, the basic windows ssh agent program. i����N( t zero_byte( t bi ( t _winapiI�PN� i iJ c C s t j j j d d � S( Nt Pageant( t ctypest windllt user32t FindWindowA( ( ( sI /opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/win_pageant.pyt _get_pageant_window_object. s c C s t t � � S( s� 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. ( t boolR ( ( ( sI /opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/win_pageant.pyt can_talk_to_agent2 s i t 64bitt COPYDATASTRUCTc B s8 e Z d Z d e f d e j j f d e j f g Z RS( sy ctypes implementation of http://msdn.microsoft.com/en-us/library/windows/desktop/ms649010%28v=vs.85%29.aspx t num_datat data_sizet data_loc( t __name__t __module__t __doc__t ULONG_PTRR t wintypest DWORDt c_void_pt _fields_( ( ( sI /opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/win_pageant.pyR B s c C s t � } | s d Sd t j � } t j | t t j � � } | �� | j | � t j d t | � t � } | j � \ } } t t | | � } t j j j | t t j | � t j | � � } | d k r| j d � | j d � } t j d | � d } | | j | � Sd SWd QXd S( sa Communication with the Pageant process is done through a shared memory-mapped file. s PageantRequest%08xR i i s >IN( R t Nonet threadt get_identR t MemoryMapt _AGENT_MAX_MSGLENt get_security_attributes_for_usert writet arrayR R t buffer_infoR t _AGENT_COPYDATA_IDR R R t SendMessageAt win32con_WM_COPYDATAt sizeoft byreft seekt readt structt unpack( t msgt hwndt map_namet pymapt char_buffert char_buffer_addresst char_buffer_sizet cdst responset datalent retlen( ( sI /opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/win_pageant.pyt _query_pageantO s( $ t PageantConnectionc B s2 e Z d Z d � Z d � Z d � Z d � Z RS( s 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 C s d | _ d S( N( R t _response( t self( ( sI /opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/win_pageant.pyt __init__} s c C s t | � | _ d S( N( R5 R7 ( R8 t data( ( sI /opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/win_pageant.pyt send� s c C sO | j d k r d S| j | } | j | | _ | j d k rK d | _ n | S( Nt ( R7 R ( R8 t nt ret( ( sI /opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/win_pageant.pyt recv� s c C s d S( N( ( R8 ( ( sI /opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/win_pageant.pyt close� s ( R R R R9 R; R? R@ ( ( ( sI /opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/win_pageant.pyR6 u s ( R R t ctypes.wintypesR t platformR( t paramiko.commonR t paramiko.py3compatR t _threadR t ImportErrorR<