Ñò pØcJc @ sí d Z d d k Z d d k Z d d k Z d d k Z d d k Z e Z e Z y d d k Z e Z Wn? e j o3 y d d k Z e Z Wq¦ e j o q¦ Xn Xd Z d Z d Z d „ Z d „ Z d „ Z d e f d „ ƒ YZ d S( sP Functions for communicating with Pageant, the basic windows ssh agent program. iÿÿÿÿNl ºPœ i iJ c C s` t o7 y t i d d ƒ } | SWq\ t i j o q\ Xn t o t i i i d d ƒ Sd S( Nt Pageant( t _has_win32allt win32guit FindWindowt errort _has_ctypest ctypest windllt user32t FindWindowAt None( t hwnd( ( s8 /usr/lib/python2.6/site-packages/paramiko/win_pageant.pyt _get_pageant_window_object5 s c C s! t p t o t ƒ o t St 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. ( R R R t Truet False( ( ( s8 /usr/lib/python2.6/site-packages/paramiko/win_pageant.pyt can_talk_to_agentB s c C sÅ t ƒ } | p d St i d ƒ } t i i | ƒ } t | d ƒ } | i | ƒ | i d t t | ƒ ƒ t i | i ƒ t d | d t i ƒ} zt i d | d ƒ } | i ƒ \ } } t i d t | | ƒ } t o" t i | t t | ƒ | ƒ } nT t oF t i d | ƒ } | i ƒ \ } } t i i i | t | | ƒ } n d } | d j o7 | i d ƒ } t i d | ƒ d } | | i | ƒ Sd SWd | i ƒ | i ƒ t i | ƒ Xd S( Ns .pags w+bt t tagnamet accesst ct LLPt Bi i s >I( R R t tempfilet mktempt ost patht basenamet opent writet _AGENT_MAX_MSGLENt lent mmapt filenot ACCESS_WRITEt arrayt buffer_infot structt packt _AGENT_COPYDATA_IDR R t SendMessaget win32con_WM_COPYDATAR R R R t SendMessageAt readt unpackt closet unlink( t msgR t filenamet map_filenamet ft pymapt char_buffert char_buffer_addresst char_buffer_sizet cdst responset _buft _addrt _sizet datalent retlen( ( s8 /usr/lib/python2.6/site-packages/paramiko/win_pageant.pyt _query_pageantN s8 '"" 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( ( s8 /usr/lib/python2.6/site-packages/paramiko/win_pageant.pyt __init__„ s c C s t | ƒ | _ d S( N( R= R? ( R@ t data( ( s8 /usr/lib/python2.6/site-packages/paramiko/win_pageant.pyt send‡ s c C sS | i d j o d S| i | } | i | | _ | i d j o d | _ n | S( Nt ( R? R ( R@ t nt ret( ( s8 /usr/lib/python2.6/site-packages/paramiko/win_pageant.pyt recvŠ s c C s d S( N( ( R@ ( ( s8 /usr/lib/python2.6/site-packages/paramiko/win_pageant.pyR, “ s ( t __name__t __module__t __doc__RA RC RG R, ( ( ( s8 /usr/lib/python2.6/site-packages/paramiko/win_pageant.pyR> | s ( RJ R R$ R R R" R R R R R t ImportErrorR R&