
Jc        !   @   sK  d  Z  d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k	 l
 Z
 d d k l Z d d k l Z d d k Td d k l Z l Z d d k l Z d d	 k l Z d d
 k l Z d d k l Z d d k l Z l Z d d k l Z d d k  l! Z! d d k" l# Z# d d k$ l% Z% d d k& l' Z' l( Z( l) Z) d d k* l+ Z+ l, Z, l- Z- l. Z. d d k/ l0 Z0 l1 Z1 y d d k2 l3 Z3 Wn# e4 j
 o d d k5 l3 Z3 n Xg  Z6 d   Z7 d d k8 Z8 e8 i9 e7  d e: f d     YZ; d e: f d     YZ< d e i= f d     YZ> d S(   s.   
L{Transport} handles the core SSH2 protocol.
iN(   t   util(   t   AuthHandler(   t   Channel(   t   *(   t   ZlibCompressort   ZlibDecompressor(   t   DSSKey(   t   KexGex(   t	   KexGroup1(   t   Message(   t
   Packetizert   NeedRekeyException(   t   ModulusPack(   t   RSAKey(   t   ServerInterface(   t
   SFTPClient(   t   SSHExceptiont   BadAuthenticationTypet   ChannelException(   t   Blowfisht   AESt   DES3t   ARC4(   t   SHAt   MD5(   t   Counterc          C   s   x t  D] }  |  i   q Wd  S(   N(   t   _active_threadst   stop_thread(   t   thr(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _join_lingering_threads?   s     t   SecurityOptionsc           B   s  e  Z d  Z d d d d d d g Z d   Z d   Z d	   Z d
   Z d   Z d   Z	 d   Z
 d   Z d   Z d   Z d   Z d   Z d   Z e e e d d  Z e e e d d  Z e e e d d  Z e e	 e d d  Z e e
 e d d  Z RS(   s8  
    Simple object containing the security preferences of an ssh transport.
    These are tuples of acceptable ciphers, digests, key types, and key
    exchange algorithms, listed in order of preference.

    Changing the contents and/or order of these fields affects the underlying
    L{Transport} (but only if you change them before starting the session).
    If you try to add an algorithm that paramiko doesn't recognize,
    C{ValueError} will be raised.  If you try to assign something besides a
    tuple to one of the fields, C{TypeError} will be raised.
    t   cipherst   digestst	   key_typest   kext   compressiont
   _transportc         C   s   | |  _  d  S(   N(   R$   (   t   selft	   transport(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   __init__T   s    c         C   s   d t  |  i  S(   se   
        Returns a string representation of this object, for debugging.

        @rtype: str
        s!   <paramiko.SecurityOptions for %s>(   t   reprR$   (   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   __repr__W   s    c         C   s
   |  i  i S(   N(   R$   t   _preferred_ciphers(   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _get_ciphers_   s    c         C   s
   |  i  i S(   N(   R$   t   _preferred_macs(   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _get_digestsb   s    c         C   s
   |  i  i S(   N(   R$   t   _preferred_keys(   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _get_key_typese   s    c         C   s
   |  i  i S(   N(   R$   t   _preferred_kex(   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _get_kexh   s    c         C   s
   |  i  i S(   N(   R$   t   _preferred_compression(   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _get_compressionk   s    c            s   t  |  t j o t |  } n t  |  t j	 o t d   n t |  i |  i     t   f d   |  } t |  d j o t	 d   n t
 |  i | |  d  S(   Ns   expected tuple or listc            s
   |    j S(    (    (   t   n(   t   possible(    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   <lambda>t   s    i    s   unknown cipher(   t   typet   listt   tuplet	   TypeErrort   getattrR$   t   keyst   filtert   lent
   ValueErrort   setattr(   R%   t   namet   origt   xt	   forbidden(    (   R5   sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _setn   s    c         C   s   |  i  d d |  d  S(   NR*   t   _cipher_info(   RE   (   R%   RC   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _set_ciphersy   s    c         C   s   |  i  d d |  d  S(   NR,   t	   _mac_info(   RE   (   R%   RC   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _set_digests|   s    c         C   s   |  i  d d |  d  S(   NR.   t	   _key_info(   RE   (   R%   RC   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _set_key_types   s    c         C   s   |  i  d d |  d  S(   NR0   t	   _kex_info(   RE   (   R%   RC   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _set_kex   s    c         C   s   |  i  d d |  d  S(   NR2   t   _compression_info(   RE   (   R%   RC   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _set_compression   s    s   Symmetric encryption cipherss    Digest (one-way hash) algorithmss   Public-key algorithmss   Key exchange algorithmss   Compression algorithmsN(   t   __name__t
   __module__t   __doc__t	   __slots__R'   R)   R+   R-   R/   R1   R3   RE   RG   RI   RK   RM   RO   t   propertyt   NoneR   R    R!   R"   R#   (    (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR   F   s0   																t
   ChannelMapc           B   s>   e  Z d    Z d   Z d   Z d   Z d   Z d   Z RS(   c         C   s"   t  i   |  _ t i   |  _ d  S(   N(   t   weakreft   WeakValueDictionaryt   _mapt	   threadingt   Lockt   _lock(   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR'      s    c         C   s3   |  i  i   z | |  i | <Wd  |  i  i   Xd  S(   N(   R\   t   acquireRY   t   release(   R%   t   chanidt   chan(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   put   s    c         C   s9   |  i  i   z |  i i | d   SWd  |  i  i   Xd  S(   N(   R\   R]   RY   t   getRU   R^   (   R%   R_   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyRb      s    c         C   sJ   |  i  i   z( y |  i | =Wn t j
 o n XWd  |  i  i   Xd  S(   N(   R\   R]   RY   t   KeyErrorR^   (   R%   R_   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   delete   s    	c         C   s3   |  i  i   z |  i i   SWd  |  i  i   Xd  S(   N(   R\   R]   RY   t   valuesR^   (   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyRe      s    c         C   s3   |  i  i   z t |  i  SWd  |  i  i   Xd  S(   N(   R\   R]   R>   RY   R^   (   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   __len__   s    (   RP   RQ   R'   Ra   Rb   Rd   Re   Rf   (    (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyRV      s   				
	t	   Transportc           B   su  e  Z d  Z d Z d Z di Z dj Z dk Z dl Z dm Z	 h h e
 d 6e
 i d 6d d 6d d 6d 6h e
 d 6e
 i d 6d d 6d d 6d 6h e d 6e i d 6d d 6d d 6d 6h e
 d 6e
 i d 6d d 6d d 6d 6h e
 d 6e
 i d 6d d 6d d 6d 6h e d 6e i d 6d d 6d d 6d 6h e d 6dn d 6d d 6d d 6d	 6h e d 6dn d 6d d 6d d 6d
 6Z h h e d 6d d 6d 6h e d 6d d 6d 6h e d 6d d 6d 6h e d 6d d 6d 6Z h e d 6e d 6Z h e d 6e d 6Z h e e f d 6e e f d  6do d 6Z dn Z d!   Z d"   Z  d#   Z! d$   Z" dn d%  Z# dn dn d&  Z$ d'   Z% d(   Z& dn d)  Z' e( e'  Z' d*   Z) d+   Z* d,   Z+ d-   Z, dn d.  Z- d/   Z. dn dn d0  Z/ dn d1  Z0 d2   Z1 d3   Z2 dn d4  Z3 d5   Z4 d6   Z5 dn e6 d7  Z7 dn d8  Z8 dn d9 dn dn d:  Z9 d;   Z: d<   Z; d=   Z< d>   Z= d?   Z> dn e6 d@  Z? dn dA  Z@ d9 dB  ZA dC   ZB dD   ZC dE   ZD dF   ZE e6 dG  ZF dH   ZG dI   ZH dJ   ZI dK   ZJ dL   ZK dM   ZL dN   ZM dO   ZN dP   ZO dQ   ZP dR   ZQ dS   ZR dT   ZS dU   ZT dV   ZU dW   ZV dX   ZW dY   ZX dZ   ZY d[   ZZ d\   Z[ d]   Z\ d^   Z] d_   Z^ d`   Z_ da   Z` db   Za dc   Zb dd   Zc de   Zd df   Ze dg   Zf dh   Zg h e^ eh 6e` ei 6ea ej 6eb ek 6ec el 6ed em 6ee en 6eW eo 6Zp h eq ir es 6eq it eu 6eq iv ew 6eq ix ey 6eq iz e{ 6eq i| e} 6eq i~ e 6eq i e 6Z RS(p   s8  
    An SSH Transport attaches to a stream (usually a socket), negotiates an
    encrypted session, authenticates, and then creates stream tunnels, called
    L{Channel}s, across the session.  Multiple channels can be multiplexed
    across a single session (and often are, in the case of port forwardings).
    s   2.0s   paramiko_1.7.6s
   aes128-ctrs
   aes256-ctrs
   aes128-cbcs   blowfish-cbcs
   aes256-cbcs   3des-cbct
   arcfour128t
   arcfour256s	   hmac-sha1s   hmac-md5s   hmac-sha1-96s   hmac-md5-96s   ssh-rsas   ssh-dsss   diffie-hellman-group1-sha1s"   diffie-hellman-group-exchange-sha1t   nonet   classt   modei   s
   block-sizes   key-sizei    i   i   i   t   sizei   s   zlib@openssh.comt   zlibc         C   sx  t  | t t f  oW | i d d  } t |  d j o | d d f } qm | d t | d  f } n t |  t j o | \ } } xf t i	 | | t i
 t i  D]6 \ } } } } }	 | t i j o | }
 |	 } Pq q Wt d |   t i |
 t i  } | i | | f  n t i i |   |  i t  t |  _ | |  _ y |  i i d  Wn t j
 o n Xt |  |  _ d |  i d |  i |  _ d	 |  _ d	 |  _ |  _ d |  _  |  _! d |  _" |  _# d |  _$ |  _% d |  _& d |  _' d |  _( d |  _) d |  _* d |  _+ t, |  _- t, |  _. t, |  _/ t, |  _0 t   |  _1 t i2   |  _3 t4   |  _5 h  |  _6 h  |  _7 d |  _8 d
 |  _9 d |  _: d |  _; d |  _< d |  _= t i>   |  _? t i2   |  _@ d |  _A d |  _B tC iD |  iB  |  _E |  i iF |  iE  d |  _G d |  _H d |  _I d |  _J t, |  _K d |  _L h  |  _M g  |  _N t iO |  i3  |  _P h  |  _Q d S(   s  
        Create a new SSH session over an existing socket, or socket-like
        object.  This only creates the Transport object; it doesn't begin the
        SSH session yet.  Use L{connect} or L{start_client} to begin a client
        session, or L{start_server} to begin a server session.

        If the object is not actually a socket, it must have the following
        methods:
            - C{send(str)}: Writes from 1 to C{len(str)} bytes, and
              returns an int representing the number of bytes written.  Returns
              0 or raises C{EOFError} if the stream has been closed.
            - C{recv(int)}: Reads from 1 to C{int} bytes and returns them as a
              string.  Returns 0 or raises C{EOFError} if the stream has been
              closed.
            - C{close()}: Closes the socket.
            - C{settimeout(n)}: Sets a (float) timeout on I/O operations.

        For ease of use, you may also pass in an address (as a tuple) or a host
        string as the C{sock} argument.  (A host string is a hostname with an
        optional port (separated by C{":"}) which will be converted into a
        tuple of C{(hostname, port)}.)  A socket will be connected to this
        address and used for communication.  Exceptions from the C{socket} call
        may be thrown in this case.

        @param sock: a socket or socket-like object to create the session over.
        @type sock: socket
        t   :i   i    i   s!   No suitable address family for %sg?s   SSH-t   -t    i   i   g      >@s   paramiko.transporti   N(R   t
   isinstancet   strt   unicodet   splitR>   t   intR7   R9   t   sockett   getaddrinfot	   AF_UNSPECt   SOCK_STREAMR   t   connectRZ   t   ThreadR'   t	   setDaemont   Truet   randpoolt   sockt
   settimeoutt   AttributeErrorR
   t
   packetizert	   _PROTO_IDt
   _CLIENT_IDt   local_versiont   remote_versiont   local_ciphert   remote_cipherRU   t   local_kex_initt   remote_kex_initt	   local_mact
   remote_mact   local_compressiont   remote_compressiont
   session_idt   host_key_typet   host_keyt
   kex_enginet   Ht   Kt   Falset   activet   initial_kex_donet   in_kext   authenticatedt   _expected_packetR[   t   lockRV   t	   _channelst   channel_eventst   channels_seent   _channel_countert   window_sizet   max_packet_sizet   _x11_handlert   _tcp_handlert   saved_exceptiont   Eventt   clear_to_sendt   clear_to_send_lockt   clear_to_send_timeoutt   log_nameR    t
   get_loggert   loggert   set_logt   auth_handlert   global_responset   completion_eventt   banner_timeoutt   server_modet   server_objectt   server_key_dictt   server_acceptst	   Conditiont   server_accept_cvt   subsystem_table(   R%   R   t   hlt   hostnamet   portt   familyt   socktypet   protot	   canonnamet   sockaddrt   aft   addr(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR'      s     																																c         C   s   d t  t t |    d @ } |  i p | d 7} n |  i d j o- | d |  i |  i |  i d d f 7} n |  i   o | d t |  i  7} n# |  i	 o | d	 7} n | d
 7} | d 7} | S(   se   
        Returns a string representation of this object, for debugging.

        @rtype: str
        s   <paramiko.Transport at %sl    s    (unconnected)Rq   s    (cipher %s, %d bits)s   key-sizei   s    (active; %d open channel(s))s    (connected; awaiting auth)s    (connecting)t   >(
   t   hext   longt   idR   R   RF   t   is_authenticatedR>   R   R   (   R%   t   out(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR)   m  s     
!


c         C   s   |  i  i   |  i   d S(   s  
        Terminate this Transport without closing the session.  On posix
        systems, if a Transport is open during process forking, both parent
        and child will share the underlying socket, but only one process can
        use the connection (without corrupting the session).  Use this method
        to clean up a Transport object without disrupting the other process.

        @since: 1.5.3
        N(   R   t   close(   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   atfork  s    
c         C   s
   t  |   S(   sw  
        Return a L{SecurityOptions} object which can be used to tweak the
        encryption algorithms this transport will permit, and the order of
        preference for them.

        @return: an object that can be used to change the preferred algorithms
            for encryption, digest (hash), public key, and key exchange.
        @rtype: L{SecurityOptions}
        (   R   (   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   get_security_options  s    
c         C   s   t  |  _ | d j	 o | |  _ |  i   d St i   |  _ } |  i   xh t  o` | i d  |  i p3 |  i   } | d j	 o
 |  n t	 d   n | i
   o PqN qN Wd S(   s  
        Negotiate a new SSH2 session as a client.  This is the first step after
        creating a new L{Transport}.  A separate thread is created for protocol
        negotiation.

        If an event is passed in, this method returns immediately.  When
        negotiation is done (successful or not), the given C{Event} will
        be triggered.  On failure, L{is_active} will return C{False}.

        (Since 1.4) If C{event} is C{None}, this method will not return until
        negotation is done.  On success, the method returns normally.
        Otherwise an SSHException is raised.

        After a successful negotiation, you will usually want to authenticate,
        calling L{auth_password <Transport.auth_password>} or
        L{auth_publickey <Transport.auth_publickey>}.

        @note: L{connect} is a simpler method for connecting as a client.

        @note: After calling this method (or L{start_server} or L{connect}),
            you should no longer directly read from or write to the original
            socket object.

        @param event: an event to trigger when negotiation is complete
            (optional)
        @type event: threading.Event

        @raise SSHException: if negotiation fails (and no C{event} was passed
            in)
        Ng?s   Negotiation failed.(   R~   R   RU   R   t   startRZ   R   t   waitt   get_exceptionR   t   isSet(   R%   t   eventt   e(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   start_client  s"    		

 

c         C   s   | d j o t   } n t |  _ | |  _ t |  _ | d j	 o | |  _ |  i   d St i	   |  _ } |  i   xh t o` | i
 d  |  i p3 |  i   } | d j	 o
 |  n t d   n | i   o Pqz qz Wd S(   s[  
        Negotiate a new SSH2 session as a server.  This is the first step after
        creating a new L{Transport} and setting up your server host key(s).  A
        separate thread is created for protocol negotiation.

        If an event is passed in, this method returns immediately.  When
        negotiation is done (successful or not), the given C{Event} will
        be triggered.  On failure, L{is_active} will return C{False}.

        (Since 1.4) If C{event} is C{None}, this method will not return until
        negotation is done.  On success, the method returns normally.
        Otherwise an SSHException is raised.

        After a successful negotiation, the client will need to authenticate.
        Override the methods
        L{get_allowed_auths <ServerInterface.get_allowed_auths>},
        L{check_auth_none <ServerInterface.check_auth_none>},
        L{check_auth_password <ServerInterface.check_auth_password>}, and
        L{check_auth_publickey <ServerInterface.check_auth_publickey>} in the
        given C{server} object to control the authentication process.

        After a successful authentication, the client should request to open
        a channel.  Override
        L{check_channel_request <ServerInterface.check_channel_request>} in the
        given C{server} object to allow channels to be opened.

        @note: After calling this method (or L{start_client} or L{connect}),
            you should no longer directly read from or write to the original
            socket object.

        @param event: an event to trigger when negotiation is complete.
        @type event: threading.Event
        @param server: an object used to perform authentication and create
            L{Channel}s.
        @type server: L{server.ServerInterface}

        @raise SSHException: if negotiation fails (and no C{event} was passed
            in)
        Ng?s   Negotiation failed.(   RU   R   R~   R   R   R   R   R   RZ   R   R   R   R   R   (   R%   R   t   serverR   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   start_server  s*    (				

 

c         C   s   | |  i  | i   <d S(   sI  
        Add a host key to the list of keys used for server mode.  When behaving
        as a server, the host key is used to sign certain packets during the
        SSH2 negotiation, so that the client can trust that we are who we say
        we are.  Because this is used for signing, the key must contain private
        key info, not just the public half.  Only one key of each type (RSA or
        DSS) is kept.

        @param key: the host key to add, usually an L{RSAKey <rsakey.RSAKey>} or
            L{DSSKey <dsskey.DSSKey>}.
        @type key: L{PKey <pkey.PKey>}
        N(   R   t   get_name(   R%   t   key(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   add_server_key  s    c         C   s,   y |  i  |  i SWn t j
 o n Xd S(   s  
        Return the active host key, in server mode.  After negotiating with the
        client, this method will return the negotiated host key.  If only one
        type of host key was set with L{add_server_key}, that's the only key
        that will ever be returned.  But in cases where you have set more than
        one type of host key (for example, an RSA key and a DSS key), the key
        type will be negotiated by the client, and this method will return the
        key of the type agreed on.  If the host key has not been negotiated
        yet, C{None} is returned.  In client mode, the behavior is undefined.

        @return: host key of the type negotiated by the client, or C{None}.
        @rtype: L{PKey <pkey.PKey>}
        N(   R   R   Rc   RU   (   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   get_server_key  s
    c         C   s   t  t  t _ d d g } |  d j	 o | i d |   n x< | D]4 } y t i i |  t SWqC t j
 o qC XqC Wd t _ t	 S(   s  
        I{(optional)}
        Load a file of prime moduli for use in doing group-exchange key
        negotiation in server mode.  It's a rather obscure option and can be
        safely ignored.

        In server mode, the remote client may request "group-exchange" key
        negotiation, which asks the server to send a random prime number that
        fits certain criteria.  These primes are pretty difficult to compute,
        so they can't be generated on demand.  But many systems contain a file
        of suitable primes (usually named something like C{/etc/ssh/moduli}).
        If you call C{load_server_moduli} and it returns C{True}, then this
        file of primes has been loaded and we will support "group-exchange" in
        server mode.  Otherwise server mode will just claim that it doesn't
        support that method of key negotiation.

        @param filename: optional path to the moduli file, if you happen to
            know that it's not in a standard location.
        @type filename: str
        @return: True if a moduli file was successfully loaded; False
            otherwise.
        @rtype: bool

        @note: This has no effect when used in client mode.
        s   /etc/ssh/modulis   /usr/local/etc/modulii    N(
   R   R   Rg   t   _modulus_packRU   t   insertt	   read_fileR~   t   IOErrorR   (   t   filenamet	   file_listt   fn(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   load_server_moduli2  s     		c         C   sW   |  i  p d St |  _  |  i i   |  i   x! |  i i   D] } | i   q? Wd S(   sP   
        Close this session, and any open channels that are tied to it.
        N(   R   R   R   R   t   joinR   Re   t   _unlink(   R%   R`   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR   \  s    
	
 c         C   s-   |  i  p |  i o t d   n |  i S(   s  
        Return the host key of the server (in client mode).

        @note: Previously this call returned a tuple of (key type, key string).
            You can get the same effect by calling
            L{PKey.get_name <pkey.PKey.get_name>} for the key type, and
            C{str(key)} for the key string.

        @raise SSHException: if no session is currently active.

        @return: public key of the remote server
        @rtype: L{PKey <pkey.PKey>}
        s   No existing session(   R   R   R   R   (   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   get_remote_server_keyh  s    c         C   s   |  i  S(   s   
        Return true if this session is active (open).

        @return: True if the session is still active (open); False if the
            session is closed
        @rtype: bool
        (   R   (   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt	   is_activez  s    c         C   s   |  i  d  S(   s.  
        Request a new channel to the server, of type C{"session"}.  This
        is just an alias for C{open_channel('session')}.

        @return: a new L{Channel}
        @rtype: L{Channel}

        @raise SSHException: if the request is rejected or the session ends
            prematurely
        t   session(   t   open_channel(   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   open_session  s    c         C   s   |  i  d d | S(   s  
        Request a new channel to the client, of type C{"x11"}.  This
        is just an alias for C{open_channel('x11', src_addr=src_addr)}.

        @param src_addr: the source address of the x11 server (port is the
            x11 port, ie. 6010)
        @type src_addr: (str, int)
        @return: a new L{Channel}
        @rtype: L{Channel}

        @raise SSHException: if the request is rejected or the session ends
            prematurely
        t   x11t   src_addr(   R   (   R%   R   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   open_x11_channel  s    c         C   s7   | \ } } | \ } } |  i  d | | f | | f  S(   s  
        Request a new channel back to the client, of type C{"forwarded-tcpip"}.
        This is used after a client has requested port forwarding, for sending
        incoming connections back to the client.

        @param src_addr: originator's address
        @param src_port: originator's port
        @param dest_addr: local (server) connected address
        @param dest_port: local (server) connected port
        s   forwarded-tcpip(   R   (   R%   t   .1t   .2R   t   src_portt	   dest_addrt	   dest_port(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   open_forwarded_tcpip_channel  s    c   	      C   sc  d } |  i p d S|  i i   za|  i   } t   } | i t t   | i	 |  | i
 |  | i
 |  i  | i
 |  i  | d j p | d j oH | i	 | d  | i
 | d  | i	 | d  | i
 | d  n4 | d j o& | i	 | d  | i
 | d  n t |  } |  i i | |  t i   |  i | <} t |  i | <| i |   | i |  i |  i  Wd |  i i   X|  i |  xh t o` | i d  |  i p3 |  i   } | d j o t d  } n |  n | i   o PqqW|  i i |  } | d j	 o | S|  i   } | d j o t d  } n |  d S(	   s  
        Request a new channel to the server.  L{Channel}s are socket-like
        objects used for the actual transfer of data across the session.
        You may only request a channel after negotiating encryption (using
        L{connect} or L{start_client}) and authenticating.

        @param kind: the kind of channel requested (usually C{"session"},
            C{"forwarded-tcpip"}, C{"direct-tcpip"}, or C{"x11"})
        @type kind: str
        @param dest_addr: the destination address of this port forwarding,
            if C{kind} is C{"forwarded-tcpip"} or C{"direct-tcpip"} (ignored
            for other channel types)
        @type dest_addr: (str, int)
        @param src_addr: the source address of this port forwarding, if
            C{kind} is C{"forwarded-tcpip"}, C{"direct-tcpip"}, or C{"x11"}
        @type src_addr: (str, int)
        @return: a new L{Channel} on success
        @rtype: L{Channel}

        @raise SSHException: if the request is rejected or the session ends
            prematurely
        s   forwarded-tcpips   direct-tcpipi    i   R   Ng?s   Unable to open channel.(   RU   R   R   R]   t   _next_channelR	   t   add_bytet   chrt   MSG_CHANNEL_OPENt
   add_stringt   add_intR   R   R   R   Ra   RZ   R   R   R~   R   t   _set_transportt   _set_windowR^   t   _send_user_messageR   R   R   R   Rb   (	   R%   t   kindR   R   R`   R_   t   mR   R   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR     sZ    
	 


c            s     i  p t d   n t |  } t |  }   i d | | f d t } | d j o t d   n | d j o | i   } n | d j o   f d   } | } n |   _ | S(   s  
        Ask the server to forward TCP connections from a listening port on
        the server, across this SSH session.

        If a handler is given, that handler is called from a different thread
        whenever a forwarded connection arrives.  The handler parameters are::

            handler(channel, (origin_addr, origin_port), (server_addr, server_port))

        where C{server_addr} and C{server_port} are the address and port that
        the server was listening on.

        If no handler is set, the default behavior is to send new incoming
        forwarded connections into the accept queue, to be picked up via
        L{accept}.

        @param address: the address to bind when forwarding
        @type address: str
        @param port: the port to forward, or 0 to ask the server to allocate
            any port
        @type port: int
        @param handler: optional handler for incoming forwarded connections
        @type handler: function(Channel, (str, int), (str, int))
        @return: the port # allocated by the server
        @rtype: int

        @raise SSHException: if the server refused the TCP forward request
        s   SSH session not actives   tcpip-forwardR   s   TCP forwarding request deniedi    c            s)   | \ } } | \ } }   i  |   d  S(   N(   t   _queue_incoming_channel(   t   channelR   R   R   R   R   R   (   R%   (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   default_handler  s    N(	   R   R   Rs   Rv   t   global_requestR~   RU   t   get_intR   (   R%   t   addressR   t   handlert   responseR   (    (   R%   sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   request_port_forward  s    

	c         C   s8   |  i  p d Sd |  _ |  i d | | f d t d S(   sY  
        Ask the server to cancel a previous port-forwarding request.  No more
        connections to the given address & port will be forwarded across this
        ssh connection.

        @param address: the address to stop forwarding
        @type address: str
        @param port: the port to stop forwarding
        @type port: int
        Ns   cancel-tcpip-forwardR   (   R   RU   R   R   R~   (   R%   R  R   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   cancel_port_forward!  s    
	c         C   s   t  i |   S(   s\  
        Create an SFTP client channel from an open transport.  On success,
        an SFTP session will be opened with the remote host, and a new
        SFTPClient object will be returned.

        @return: a new L{SFTPClient} object, referring to an sftp session
            (channel) across this transport
        @rtype: L{SFTPClient}
        (   R   t   from_transport(   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   open_sftp_client1  s    
c         C   s{   t    } | i t t   t i   | d j o! t t i d   d d } n | i	 t i |   |  i
 |  d S(   s  
        Send a junk packet across the encrypted link.  This is sometimes used
        to add "noise" to a connection to confuse would-be attackers.  It can
        also be used as a keep-alive for long lived connections traversing
        firewalls.

        @param bytes: the number of random bytes to send in the payload of the
            ignored packet -- defaults to a random number from 10 to 41.
        @type bytes: int
        i   i    i
   N(   R	   R   R   t
   MSG_IGNORER   t   stirRU   t   ordt	   get_bytest	   add_bytesR   (   R%   t   bytesR   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   send_ignore=  s    	
!c         C   s   t  i   |  _ |  i   xn t of |  i i d  |  i p3 |  i   } | d j	 o
 |  n t	 d   n |  i i
   o Pq q Wd S(   s8  
        Force this session to switch to new keys.  Normally this is done
        automatically after the session hits a certain number of packets or
        bytes sent or received, but this method gives you the option of forcing
        new keys whenever you want.  Negotiating new keys causes a pause in
        traffic both ways as the two sides swap keys and do computations.  This
        method returns when the session has switched to new keys.

        @raise SSHException: if the key renegotiation failed (which causes the
            session to end)
        g?s   Negotiation failed.N(   RZ   R   R   t   _send_kex_initR~   R   R   R   RU   R   R   (   R%   R   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   renegotiate_keysP  s    
 


c         C   s&   |  i  i | t i |   d   d S(   s  
        Turn on/off keepalive packets (default is off).  If this is set, after
        C{interval} seconds without sending any data over the connection, a
        "keepalive" packet will be sent (and ignored by the remote host).  This
        can be useful to keep connections alive over a NAT, for example.

        @param interval: seconds to wait before sending a keepalive packet (or
            0 to disable keepalives).
        @type interval: int
        c         S   s   |  i  d  d t S(   s   keepalive@lag.netR   (   R   R   (   RC   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR6   u  s    N(   R   t   set_keepaliveRW   t   proxy(   R%   t   interval(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR  i  s    c         C   s   | o t  i   |  _ n t   } | i t t   | i |  | i |  | d j	 o | i
 |   n |  i t d |  |  i |  | p d Sx@ t o8 |  i i d  |  i p d S|  i i   o Pq q W|  i S(   s  
        Make a global request to the remote host.  These are normally
        extensions to the SSH2 protocol.

        @param kind: name of the request.
        @type kind: str
        @param data: an optional tuple containing additional data to attach
            to the request.
        @type data: tuple
        @param wait: C{True} if this method should not return until a response
            is received; C{False} otherwise.
        @type wait: bool
        @return: a L{Message} containing possible additional data if the
            request was successful (or an empty L{Message} if C{wait} was
            C{False}); C{None} if the request was denied.
        @rtype: L{Message}
        s   Sending global request "%s"g?N(   RZ   R   R   R	   R   R   t   MSG_GLOBAL_REQUESTR   t   add_booleanRU   t   addt   _logt   DEBUGR   R~   R   R   R   R   (   R%   R   t   dataR   R   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR   w  s(    	 

c         C   s   |  i  i   zr t |  i  d j o |  i i d  } nC |  i i |  t |  i  d j o |  i i d  } n d } Wd |  i  i   X| S(   s  
        Return the next channel opened by the client over this transport, in
        server mode.  If no channel is opened before the given timeout, C{None}
        is returned.

        @param timeout: seconds to wait for a channel, or C{None} to wait
            forever
        @type timeout: int
        @return: a new Channel opened by the client
        @rtype: L{Channel}
        i    N(	   R   R]   R>   R   t   popR   R   RU   R^   (   R%   t   timeoutR`   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   accept  s    
Rq   c         C   s  | d j	 o | i   g |  _ n |  i   | d j	 o |  i   } | i   | i   j p t |  t |  j ox |  i t d  |  i t d | i   t t |   f  |  i t d | i   t t |   f  t	 d   n |  i t d | i    n | d j	 p | d j	 oU | d j	 o$ |  i t d  |  i
 | |  q}|  i t d  |  i | |  n d S(   s  
        Negotiate an SSH2 session, and optionally verify the server's host key
        and authenticate using a password or private key.  This is a shortcut
        for L{start_client}, L{get_remote_server_key}, and
        L{Transport.auth_password} or L{Transport.auth_publickey}.  Use those
        methods if you want more control.

        You can use this method immediately after creating a Transport to
        negotiate encryption with a server.  If it fails, an exception will be
        thrown.  On success, the method will return cleanly, and an encrypted
        session exists.  You may immediately call L{open_channel} or
        L{open_session} to get a L{Channel} object, which is used for data
        transfer.

        @note: If you fail to supply a password or private key, this method may
        succeed, but a subsequent L{open_channel} or L{open_session} call may
        fail because you haven't authenticated yet.

        @param hostkey: the host key expected from the server, or C{None} if
            you don't want to do host key verification.
        @type hostkey: L{PKey<pkey.PKey>}
        @param username: the username to authenticate as.
        @type username: str
        @param password: a password to use for authentication, if you want to
            use password authentication; otherwise C{None}.
        @type password: str
        @param pkey: a private key to use for authentication, if you want to
            use private key authentication; otherwise C{None}.
        @type pkey: L{PKey<pkey.PKey>}

        @raise SSHException: if the SSH2 negotiation fails, the host key
            supplied by the server is incorrect, or authentication fails.
        s   Bad host key from servers   Expected: %s: %ss   Got     : %s: %ss   Host key verified (%s)s   Attempting password auth...s   Attempting public-key auth...N(   RU   R   R.   R   R   Rs   R  R  R(   R   t   auth_passwordt   auth_publickey(   R%   t   hostkeyt   usernamet   passwordt   pkeyR   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR{     s$    "
2,,c         C   s<   |  i  i   z |  i } d |  _ | SWd |  i  i   Xd S(   s}  
        Return any exception that happened during the last server request.
        This can be used to fetch more specific error information after using
        calls like L{start_client}.  The exception (if any) is cleared after
        this call.

        @return: an exception, or C{None} if there is no stored exception.
        @rtype: Exception

        @since: 1.1
        N(   R   R]   R   RU   R^   (   R%   R   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR     s    		c         O   s<   z' |  i  i   | | | f |  i | <Wd |  i  i   Xd S(   sX  
        Set the handler class for a subsystem in server mode.  If a request
        for this subsystem is made on an open ssh channel later, this handler
        will be constructed and called -- see L{SubsystemHandler} for more
        detailed documentation.

        Any extra parameters (including keyword arguments) are saved and
        passed to the L{SubsystemHandler} constructor later.

        @param name: name of the subsystem.
        @type name: str
        @param handler: subclass of L{SubsystemHandler} that handles this
            subsystem.
        @type handler: class
        N(   R   R]   R   R^   (   R%   RA   R  t   largt   kwarg(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   set_subsystem_handler  s    c         C   s'   |  i  o |  i d j	 o |  i i   S(   s  
        Return true if this session is active and authenticated.

        @return: True if the session is still open and has been authenticated
            successfully; False if authentication failed and/or the session is
            closed.
        @rtype: bool
        N(   R   R   RU   R   (   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR     s    	c         C   s-   |  i  p |  i d j o d S|  i i   S(   s  
        Return the username this connection is authenticated for.  If the
        session is not authenticated (or authentication failed), this method
        returns C{None}.

        @return: username that was authenticated, or C{None}.
        @rtype: string
        N(   R   R   RU   t   get_username(   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR&  (  s    	c         C   sd   |  i  p |  i o t d   n t i   } t |   |  _ |  i i | |  |  i i |  S(   s  
        Try to authenticate to the server using no authentication at all.
        This will almost always fail.  It may be useful for determining the
        list of authentication types supported by the server, by catching the
        L{BadAuthenticationType} exception raised.

        @param username: the username to authenticate as
        @type username: string
        @return: list of auth types permissible for the next stage of
            authentication (normally empty)
        @rtype: list

        @raise BadAuthenticationType: if "none" authentication isn't allowed
            by the server for this user
        @raise SSHException: if the authentication failed due to a network
            error

        @since: 1.5
        s   No existing session(	   R   R   R   RZ   R   R   R   t	   auth_nonet   wait_for_response(   R%   R   t   my_event(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR'  5  s    c   	         s  |  i  p |  i o t d   n | d j o t i   } n | } t |   |  _ |  i i |   |  | d j	 o g  Sy |  i i	 |  SWnu t
 j
 oi } | p d | i j o   n y#   f d   } |  i | |  SWqt j
 o } |  qXn Xd S(   s	  
        Authenticate to the server using a password.  The username and password
        are sent over an encrypted link.

        If an C{event} is passed in, this method will return immediately, and
        the event will be triggered once authentication succeeds or fails.  On
        success, L{is_authenticated} will return C{True}.  On failure, you may
        use L{get_exception} to get more detailed error information.

        Since 1.1, if no event is passed, this method will block until the
        authentication succeeds or fails.  On failure, an exception is raised.
        Otherwise, the method simply returns.

        Since 1.5, if no event is passed and C{fallback} is C{True} (the
        default), if the server doesn't support plain password authentication
        but does support so-called "keyboard-interactive" mode, an attempt
        will be made to authenticate using this interactive mode.  If it fails,
        the normal exception will be thrown as if the attempt had never been
        made.  This is useful for some recent Gentoo and Debian distributions,
        which turn off plain password authentication in a misguided belief
        that interactive authentication is "more secure".  (It's not.)

        If the server requires multi-step authentication (which is very rare),
        this method will return a list of auth types permissible for the next
        step.  Otherwise, in the normal case, an empty list is returned.

        @param username: the username to authenticate as
        @type username: str
        @param password: the password to authenticate with
        @type password: str or unicode
        @param event: an event to trigger when the authentication attempt is
            complete (whether it was successful or not)
        @type event: threading.Event
        @param fallback: C{True} if an attempt at an automated "interactive"
            password auth should be made if the server doesn't support normal
            password auth
        @type fallback: bool
        @return: list of auth types permissible for the next stage of
            authentication (normally empty)
        @rtype: list

        @raise BadAuthenticationType: if password authentication isn't
            allowed by the server for this user (and no event was passed in)
        @raise AuthenticationException: if the authentication failed (and no
            event was passed in)
        @raise SSHException: if there was a network error
        s   No existing sessions   keyboard-interactivec            sB   t  |  d j o t d   n t  |  d j o g  S  g S(   Ni   s   Fallback authentication failed.i    (   R>   R   (   t   titlet   instructionst   fields(   R!  (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR    s
    N(   R   R   R   RU   RZ   R   R   R   R  R(  R   t   allowed_typest   auth_interactive(	   R%   R   R!  R   t   fallbackR)  RC   R  t   ignored(    (   R!  sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR  P  s(    0
c         C   s   |  i  p |  i o t d   n | d j o t i   } n | } t |   |  _ |  i i | | |  | d j	 o g  S|  i i	 |  S(   s  
        Authenticate to the server using a private key.  The key is used to
        sign data from the server, so it must include the private part.

        If an C{event} is passed in, this method will return immediately, and
        the event will be triggered once authentication succeeds or fails.  On
        success, L{is_authenticated} will return C{True}.  On failure, you may
        use L{get_exception} to get more detailed error information.

        Since 1.1, if no event is passed, this method will block until the
        authentication succeeds or fails.  On failure, an exception is raised.
        Otherwise, the method simply returns.

        If the server requires multi-step authentication (which is very rare),
        this method will return a list of auth types permissible for the next
        step.  Otherwise, in the normal case, an empty list is returned.

        @param username: the username to authenticate as
        @type username: string
        @param key: the private key to authenticate with
        @type key: L{PKey <pkey.PKey>}
        @param event: an event to trigger when the authentication attempt is
            complete (whether it was successful or not)
        @type event: threading.Event
        @return: list of auth types permissible for the next stage of
            authentication (normally empty)
        @rtype: list

        @raise BadAuthenticationType: if public-key authentication isn't
            allowed by the server for this user (and no event was passed in)
        @raise AuthenticationException: if the authentication failed (and no
            event was passed in)
        @raise SSHException: if there was a network error
        s   No existing sessionN(
   R   R   R   RU   RZ   R   R   R   R  R(  (   R%   R   R   R   R)  (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR    s    #c         C   sj   |  i  p |  i o t d   n t i   } t |   |  _ |  i i | | | |  |  i i |  S(   s(  
        Authenticate to the server interactively.  A handler is used to answer
        arbitrary questions from the server.  On many servers, this is just a
        dumb wrapper around PAM.

        This method will block until the authentication succeeds or fails,
        peroidically calling the handler asynchronously to get answers to
        authentication questions.  The handler may be called more than once
        if the server continues to ask questions.

        The handler is expected to be a callable that will handle calls of the
        form: C{handler(title, instructions, prompt_list)}.  The C{title} is
        meant to be a dialog-window title, and the C{instructions} are user
        instructions (both are strings).  C{prompt_list} will be a list of
        prompts, each prompt being a tuple of C{(str, bool)}.  The string is
        the prompt and the boolean indicates whether the user text should be
        echoed.

        A sample call would thus be:
        C{handler('title', 'instructions', [('Password:', False)])}.

        The handler should return a list or tuple of answers to the server's
        questions.

        If the server requires multi-step authentication (which is very rare),
        this method will return a list of auth types permissible for the next
        step.  Otherwise, in the normal case, an empty list is returned.

        @param username: the username to authenticate as
        @type username: string
        @param handler: a handler for responding to server questions
        @type handler: callable
        @param submethods: a string list of desired submethods (optional)
        @type submethods: str
        @return: list of auth types permissible for the next stage of
            authentication (normally empty).
        @rtype: list

        @raise BadAuthenticationType: if public-key authentication isn't
            allowed by the server for this user
        @raise AuthenticationException: if the authentication failed
        @raise SSHException: if there was a network error

        @since: 1.5
        s   No existing session(	   R   R   R   RZ   R   R   R   R.  R(  (   R%   R   R  t
   submethodsR)  (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR.    s    .c         C   s2   | |  _  t i |  |  _ |  i i |  i  d S(   sp  
        Set the channel for this transport's logging.  The default is
        C{"paramiko.transport"} but it can be set to anything you want.
        (See the C{logging} module for more info.)  SSH Channels will log
        to a sub-channel of the one specified.

        @param name: new channel name for logging
        @type name: str

        @since: 1.1
        N(   R   R    R   R   R   R   (   R%   RA   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   set_log_channel
  s    	c         C   s   |  i  S(   s   
        Return the channel name used for this transport's logging.

        @return: channel name.
        @rtype: str

        @since: 1.2
        (   R   (   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   get_log_channel  s    	c         C   s   |  i  i |  d S(   sj  
        Turn on/off logging a hex dump of protocol traffic at DEBUG level in
        the logs.  Normally you would want this off (which is the default),
        but if you are debugging something, it may be useful.

        @param hexdump: C{True} to log protocol traffix (in hex) to the log;
            C{False} otherwise.
        @type hexdump: bool
        N(   R   t   set_hexdump(   R%   t   hexdump(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR4  %  s    
c         C   s   |  i  i   S(   s   
        Return C{True} if the transport is currently logging hex dumps of
        protocol traffic.

        @return: C{True} if hex dumps are being logged
        @rtype: bool

        @since: 1.4
        (   R   t   get_hexdump(   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR6  1  s    
c         C   s!   | o d |  _  n
 d |  _  d S(   s  
        Turn on/off compression.  This will only have an affect before starting
        the transport (ie before calling L{connect}, etc).  By default,
        compression is off since it negatively affects interactive sessions.

        @param compress: C{True} to ask the remote client/server to compress
            traffic; C{False} to refuse compression
        @type compress: bool

        @since: 1.5.2
        s   zlib@openssh.comRn   Rj   N(   s   zlib@openssh.coms   zlibRj   (   Rj   (   R2   (   R%   t   compress(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   use_compression=  s    c         C   s.   t  |  i d d  } | d j o d S|   S(   sy  
        Return the address of the remote side of this Transport, if possible.
        This is effectively a wrapper around C{'getpeername'} on the underlying
        socket.  If the socket-like object has no C{'getpeername'} method,
        then C{("unknown", 0)} is returned.

        @return: the address if the remote host, if known
        @rtype: tuple(str, int)
        t   getpeernamet   unknowni    N(   s   unknowni    (   R;   R   RU   (   R%   t   gp(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR9  N  s    
c         C   s   t  |  _ |  i i   d  S(   N(   R   R   R   R   (   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR   ]  s    	c         G   sX   t  t |  t  o( x; | D] } |  i i | |  q Wn |  i i | | |  d  S(   N(   t
   issubclassR7   R8   R   t   log(   R%   t   levelt   msgt   argsR   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR  e  s
     c         C   s   |  i  S(   s0   used by KexGex to find primes for group exchange(   R   (   R%   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _get_modulus_packl  s    c         C   s_   |  i  } x; |  i i |  d j	 o! |  i  d d @|  _  |  i  } q W|  i  d d @|  _  | S(   s   you are holding the locki   i N(   R   R   Rb   RU   (   R%   R_   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR   p  s    	 c         C   s   |  i  i |  d S(   s?   used by a Channel to remove itself from the active channel listN(   R   Rd   (   R%   R_   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _unlink_channely  s    c         C   s   |  i  i |  d  S(   N(   R   t   send_message(   R%   R  (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _send_message}  s    c         C   s   t  i    } x t o |  i i d  |  i p |  i t d  d S|  i i   |  i i	   o Pn |  i i
   t  i    | |  i j o t d   q q Wz |  i |  Wd |  i i
   Xd S(   s{   
        send a message, but block if we're in key negotiation.  this is used
        for user-initiated requests.
        g?s0   Dropping user packet because connection is dead.Ns2   Key-exchange timed out waiting for key negotiation(   t   timeR~   R   R   R   R  R  R   R]   R   R^   R   R   RD  (   R%   R  R   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR     s      
c         C   s3   | |  _  | |  _ |  i d j o | |  _ n d S(   sB   used by a kex object to set the K (root key) and H (exchange hash)N(   R   R   R   RU   (   R%   t   kt   h(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _set_K_H  s    		c         G   s   t  |  |  _ d S(   sG   used by a kex object to register the next packet type it expects to seeN(   R9   R   (   R%   t   ptypes(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _expect_packet  s    c         C   sy   |  i  |  i t |   } | d  j o t d   n | i |  i t |   p t d |  i   n | |  _ d  S(   Ns   Unknown host key types#   Signature verification (%s) failed.(   RJ   R   R	   RU   R   t   verify_ssh_sigR   R   (   R%   R   t   sigR   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _verify_key  s    c         C   s   t    } | i |  i  | i |  i  | i |  | i |  i  t i t	 |   i
   } } x} t |  | j  oi t    } | i |  i  | i |  i  | i |  t i t	 |   i
   } | | 7} | | 7} qh W| |  S(   s0   id is 'A' - 'F' for the various keys used by ssh(   R	   t	   add_mpintR   R  R   R   R   R   t   newRs   t   digestR>   (   R%   R   t   nbytesR   R   t   sofarRP  (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _compute_key  s     	 	
c         C   s   | |  i  j o t d |   n | d j o0 |  i  | d i |  } | i d d  | S| i d  o` t i d |  i  | d	 d
 d t i | t   } |  i  | d i | |  i  | d | |  S|  i  | d i | |  i  | d |  Sd  S(   Ns   Unknown client cipher Rh   Ri   Rk   t    i   s   -ctrt   nbitss
   block-sizei   t   initial_valueRl   (   Rh   Ri   (	   RF   R   RO  t   encryptt   endswithR   R    t   inflate_longR~   (   R%   RA   R   t   ivt   ciphert   counter(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _get_cipher  s    3-c            s6   | d  j o   f d   } |   _ n
 |   _ d  S(   Nc            s   | \ } }   i  |   d  S(   N(   R   (   R   R   R   R   (   R%   (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR     s    	(   RU   R   (   R%   R  R   (    (   R%   sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _set_x11_handler  s    c         C   sC   |  i  i   z! |  i i |  |  i i   Wd  |  i  i   Xd  S(   N(   R   R]   R   t   appendR   t   notifyR^   (   R%   R   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR     s
    c   	      C   s  t  i |   |  i o. |  i t d t t t |    d @  n+ |  i t d t t t |    d @  y|  i i	 |  i
 d  |  i   |  i   |  i t  x|  i o|  i i   o |  i o |  i   n y |  i i   \ } } Wn t j
 o
 q n X| t j o q nW | t j o( |  i |  t |  _ |  i i   Pn" | t j o |  i |  q n t |  i  d j oq | |  i j o t d |  i | f   n t   |  _ | d j o' | d j o |  i i  | |  q qn | |  i! j o |  i! | |  |  q | |  i" j o | i#   } |  i$ i% |  } | d  j	 o |  i" | | |  qb| |  i' j o |  i t d	 |  qb|  i t( d
 |  t |  _ |  i i   q |  i) d  j	 o1 | |  i) i! j o |  i) i! | |  i) |  q |  i t* d |  t+   } | i, t- t.   | i/ | i0  |  i1 |  q WWn=t j
 oB } |  i t( d t2 |   |  i t( t3 i4    | |  _5 n t6 j
 o" } |  i t d  | |  _5 n t7 i8 j
 og } t9 | i:  t j o" d | i: d | i: d f } n
 | i: } |  i t( d |  | |  _5 nO t; j
 oB } |  i t( d t2 |   |  i t( t3 i4    | |  _5 n Xt  i< |   x! |  i$ i=   D] } | i>   qW|  i o t |  _ |  i i   |  i? d  j o |  i? i@   n |  i) d  j	 o |  i) iA   n x! |  iB i=   D] } | i@   qKWz |  iC iD   |  iE iF   Wd  |  iC iG   Xn |  iH i   d  S(   Ns!   starting thread (server mode): %sl    s!   starting thread (client mode): %ss   
i    s    Expecting packet from %r, got %di   i'   s$   Ignoring message for dead channel %ds&   Channel request for unknown channel %ds   Oops, unhandled type %ds   Exception: s   EOF in transport threads   %s (%d)i   s   Socket exception: s   Unknown exception: (I   R   R_  R   R  R  R   R   R   R   t	   write_allR   t   _check_bannerR  RJ  t   MSG_KEXINITR   t
   need_rekeyR   t   read_messageR   R  t   MSG_DISCONNECTt   _parse_disconnectR   R   t	   MSG_DEBUGt   _parse_debugR>   R   R   R9   R   t
   parse_nextt   _handler_tablet   _channel_handler_tableR   R   Rb   RU   R   t   ERRORR   t   WARNINGR	   R   R   t   MSG_UNIMPLEMENTEDR   t   seqnoRD  Rs   R    t
   tb_stringsR   t   EOFErrorRw   t   errorR7   R@  t	   Exceptiont   removeRe   R   R   t   sett   abortR   R   R]   R   R`  R^   R   (	   R%   t   ptypeR   R_   R`   R?  R   t   emsgR   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   run  s    
.*

 
		#	"	 
	 c         C   sk   |  i  i   z |  i i   Wd  |  i  i   X|  i d  j o |  i   n |  i |  |  i	 i
   d  S(   N(   R   R]   R   t   clearR^   R   RU   R  t   _parse_kex_initR   t	   start_kex(   R%   R   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _negotiate_keysH  s    c   	   
   C   s  x t  d  D] } | d j o |  i } n d } y |  i i |  } Wn+ t j
 o } t d t |    n X| d  d j o Pn |  i t d |  q W| d  d j o t d | d	   n | |  _	 d
 } t
 i | d  } | d j o | | d } | |  } n | i d d  } t |  d j  o t d   n | d } | d } | d j o$ | d j o t d | f   n |  i t d | | f  d  S(   Nid   i    i   s!   Error reading SSH protocol banneri   s   SSH-s   Banner: s!   Indecipherable protocol version "t   "Rq   RT  i   Rp   i   s   Invalid SSH banners   1.99s   2.0s(   Incompatible version (%s instead of 2.0)s!   Connected (version %s, client %s)(   t   rangeR   R   t   readlineRt  R   Rs   R  R  R   t   stringt   findRu   R>   t   INFO(	   R%   t   iR  t   bufRC   t   commentt   segst   versiont   client(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyRb  U  s8     	

c         C   s  |  i  i   z |  i i   Wd |  i  i   Xt |  _ |  i ow |  i d j oE d |  i
 j o5 t |  i   i  } | i d  | |  i   _ n t |  i i   i |  i  } n
 |  i } t i   t   } | i t t   | i t i d   | i |  i
  | i |  | i |  i  | i |  i  | i |  i  | i |  i  | i |  i  | i |  i  | i  d  | i  d  | i! t"  | i# d  t$ |  |  _% |  i& |  d S(   s   
        announce to the other side that we'd like to negotiate keys, and what
        kind of key negotiation we support.
        Ns"   diffie-hellman-group-exchange-sha1i   Rq   i    ('   R   R]   R   R{  R^   R~   R   R   R   RU   R0   R8   R   R"   Ru  R=   R   R<   t   __contains__R.   R   R	  R	   R   R   Rc  R  R  t   add_listR*   R,   R2   R   R  R   R   Rs   R   RD  (   R%   t   pkext   available_server_keysR   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR  y  s>    	
 	
	c         C   s  | i  d  } | i   } | i   } | i   } | i   } | i   } | i   } | i   }	 | i   }
 | i   } | i   } | i   } | i   } |  i t d t |  d t |  d t |  d t |  d t |  d t |  d t |	  d	 t |
  d
 t |  d t |  d t |   |  i o t |  i	 i
 |  } n t | i
 |  i	  } t |  d j o t d   n |  i | d |   |  _ |  i o4 t |  i i   i
 |  i  } t | i
 |  } n t | i
 |  i  } t |  d j o t d   n | d |  _ |  i o# |  i   d  j o t d   n |  i o. t |  i i
 |  } t |  i i
 |  } n+ t | i
 |  i  } t | i
 |  i  } t |  d j p t |  d j o t d   n | d |  _ | d |  _ |  i t d |  i |  i f  |  i o. t |  i i
 |  } t |  i i
 |  } n+ t | i
 |  i  } t | i
 |  i  } t |  d j p t |  d j o t d   n | d |  _ | d |  _ |  i o. t |  i i
 |	  } t |  i i
 |
  } n+ t |	 i
 |  i  } t |
 i
 |  i  } t |  d j p t |  d j o  t d | | |  i f   n | d |  _ | d |  _ |  i t d | d |  i |  i |  i |  i |  i |  i |  i f  t t  | i    |  _! d  S(   Ni   s
   kex algos:s    server key:s    client encrypt:s    server encrypt:s    client mac:s    server mac:s    client compress:s    server compress:s    client lang:s    server lang:s    kex follows?i    s3   Incompatible ssh peer (no acceptable kex algorithm)s.   Incompatible ssh peer (no acceptable host key)s;   Incompatible ssh peer (can't match requested host key type)s/   Incompatible ssh server (no acceptable ciphers)s#   Ciphers agreed: local=%s, remote=%ss,   Incompatible ssh server (no acceptable macs)s<   Incompatible ssh server (no acceptable compression) %r %r %rsy   using kex %s; server key type %s; cipher: local %s, remote %s; mac: local %s, remote %s; compression: local %s, remote %s("   R  t   get_listt   get_booleanR   R  R  Rs   R   R=   R0   R  R>   R   RL   R   R   R<   R.   R   R   RU   R*   R   R   R,   R   R   R2   R   R   R   Rc  t
   get_so_farR   (   R%   R   t   cookiet   kex_algo_listt   server_key_algo_listt   client_encrypt_algo_listt   server_encrypt_algo_listt   client_mac_algo_listt   server_mac_algo_listt   client_compress_algo_listt   server_compress_algo_listt   client_lang_listt   server_lang_listt   kex_followst   unusedt
   agreed_kexR  t   agreed_keyst   agreed_local_cipherst   agreed_remote_cipherst   agreed_remote_macst   agreed_local_macst   agreed_remote_compressiont   agreed_local_compression(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyR|    s    		


			& 
&
& c   	      C   s  |  i  |  i d } |  i o6 |  i d |  } |  i d |  i  |  i d  } n3 |  i d |  } |  i d |  i  |  i d  } |  i |  i | |  } |  i |  i d } |  i |  i d } |  i o |  i d	 | i  } n |  i d
 | i  } |  i i	 | | | | |  |  i
 |  i d } | d j	 oA |  i d j p
 |  i o' |  i t d  |  i i |    n d S(   sD   switch on newly negotiated encryption parameters for inbound traffics
   block-sizet   At   Cs   key-sizet   Bt   DRm   Rk   t   Et   Fi   s   zlib@openssh.coms$   Switching on inbound compression ...N(   RF   R   R   RS  R]  RH   R   t   digest_sizeR   t   set_inbound_cipherRN   R   RU   R   R  R  t   set_inbound_compressor(	   R%   t
   block_sizet   IV_int   key_int   enginet   mac_sizet
   mac_enginet   mac_keyt   compress_in(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _activate_inbound  s"    
$ 
'c   
      C   s  t    } | i t t   |  i |  |  i |  i d } |  i o6 |  i d |  } |  i d |  i |  i d  } n3 |  i d |  } |  i d |  i |  i d  } |  i	 |  i | |  } |  i
 |  i d } |  i
 |  i d } |  i o |  i d	 | i  } n |  i d
 | i  } |  i i | | | | |  |  i |  i d }	 |	 d j	 oA |  i d j p
 |  i o' |  i t d  |  i i |	    n |  i i   p t |  _ n |  i t  d S(   sE   switch on newly negotiated encryption parameters for outbound traffics
   block-sizeR  R  s   key-sizeR  R  Rm   Rk   R  R  i    s   zlib@openssh.coms%   Switching on outbound compression ...N(   R	   R   R   t   MSG_NEWKEYSRD  RF   R   R   RS  R]  RH   R   R  R   t   set_outbound_cipherRN   R   RU   R   R  R  t   set_outbound_compressorRd  R   R   RJ  (
   R%   R   R  t   IV_outt   key_outR  R  R  R  t   compress_out(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _activate_outbound  s.    	
$ 
'c         C   s   t  |  _ |  i d j o; |  i |  i d } |  i t d  |  i i |    n |  i d j o; |  i |  i d } |  i t d  |  i i	 |    n d  S(   Ns   zlib@openssh.comi    s%   Switching on outbound compression ...i   s$   Switching on inbound compression ...(
   R~   R   R   RN   R  R  R   R  R   R  (   R%   R  R  (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _auth_trigger;  s    	c         C   s   |  i  t d  |  i   d  |  _ |  _ d  |  _ d  |  _ |  i o# |  i	 d  j o t
 |   |  _	 n |  i p t |  _ n |  i d  j o |  i i   n |  i i   p t |  _ n |  i i   z |  i i   Wd  |  i i   Xd  S(   Ns   Switch to new keys ...(   R  R  R  RU   R   R   R   R   R   R   R   R   R~   R   Rv  R   Rd  R   R   R   R]   R   R^   (   R%   R   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _parse_newkeysG  s$    
		
c         C   s6   | i    } | i   } |  i t d | | f  d  S(   Ns   Disconnect (code %d): %s(   R   t
   get_stringR  R  (   R%   R   t   codet   desc(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyRg  a  s    c   	      C   s  | i    } |  i t d |  | i   } |  i p |  i t d |  t } n | d j oK | i    } | i   } |  i i | |  } | t j o | f } qnX | d j o5 | i    } | i   } |  i i	 | |  t
 } n |  i i | |  } d } t |  t j o | } t
 } n | oX t   } | o$ | i t t   | i |   n | i t t   |  i |  n d  S(   Ns   Received global request "%s"s*   Rejecting "%s" global request from server.s   tcpip-forwards   cancel-tcpip-forward(    (   R  R  R  R  R   R   R   R   t   check_port_forward_requestt   cancel_port_forward_requestR~   t   check_global_requestR7   R9   R	   R   R   t   MSG_REQUEST_SUCCESSR  t   MSG_REQUEST_FAILURERD  (	   R%   R   R   t
   want_replyt   okR  R   t   extraR?  (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _parse_global_requestf  s:    



	c         C   s>   |  i  t d  | |  _ |  i d  j	 o |  i i   n d  S(   Ns   Global request successful.(   R  R  R   R   RU   Rv  (   R%   R   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _parse_request_success  s    	c         C   s>   |  i  t d  d  |  _ |  i d  j	 o |  i i   n d  S(   Ns   Global request denied.(   R  R  RU   R   R   Rv  (   R%   R   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _parse_request_failure  s    	c         C   s   | i    } | i    } | i    } | i    } |  i i |  } | d  j o |  i t d  d  S|  i i   zZ | i | | |  |  i t	 d |  | |  i
 j o |  i
 | i   |  i
 | =n Wd  |  i i   Xd  S(   Ns%   Success for unrequested channel! [??]s   Secsh channel %d opened.(   R   R   Rb   RU   R  Rn  R   R]   t   _set_remote_channelR  R   Rv  R^   (   R%   R   R_   t   server_chanidt   server_window_sizet   server_max_packet_sizeR`   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _parse_channel_open_success  s"    c         C   s   | i    } | i    } | i   } | i   } t i | d  } |  i t d | | | f  |  i i   zi t | |  |  _	 | |  i
 j oC |  i i |  | |  i
 j o |  i
 | i   |  i
 | =q n Wd  |  i i   Xd  S(   Ns   (unknown code)s$   Secsh channel %d open FAILED: %s: %s(   R   R  t   CONNECTION_FAILED_CODERb   R  R  R   R]   R   R   R   R   Rd   Rv  R^   (   R%   R   R_   t   reasont
   reason_strt   langt   reason_text(    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _parse_channel_open_failure  s     c         C   s.  | i    } | i   } | i   } | i   } t } | d j ot |  i d  j	 od | i    } | i   } |  i t d | | f  |  i i   z |  i	   }	 Wd  |  i i
   Xn| d j o |  i d  j	 o| | i    }
 | i   } | i    } | i   } |  i t d | | f  |  i i   z |  i	   }	 Wd  |  i i
   Xn|  i p$ |  i t d |  t } t } n |  i i   z |  i	   }	 Wd  |  i i
   X| d j oX | i    } | i   } | i    } | i   } |  i i |	 | | f | | f  } n |  i i | |	  } | t j o |  i t d |  t } n | ob t   } | i t t   | i |  | i |  | i d  | i d	  |  i |  d  St |	  } |  i i   zZ |  i i |	 |  t |  i |	 <| i |   | i |  i  |  i!  | i" | | |  Wd  |  i i
   Xt   } | i t t#   | i |  | i |	  | i |  i   | i |  i!  |  i |  |  i t$ d
 |	 |  | d j o |  i | | | f  nM | d j o2 | | f | _% |  i | | | f |
 | f  n |  i& |  d  S(   NR   s"   Incoming x11 connection from %s:%ds   forwarded-tcpips,   Incoming tcp forwarded connection from %s:%ds+   Rejecting "%s" channel request from server.s   direct-tcpips+   Rejecting "%s" channel request from client.Rq   t   ens   Secsh channel %d (%s) opened.('   R  R   R   R   RU   R  R  R   R]   R   R^   R   R   R~   t'   OPEN_FAILED_ADMINISTRATIVELY_PROHIBITEDR   t"   check_channel_direct_tcpip_requestt   check_channel_requestt   OPEN_SUCCEEDEDR	   R   R   t   MSG_CHANNEL_OPEN_FAILURER   R   RD  R   R   Ra   R   R   R   R   R   R  t   MSG_CHANNEL_OPEN_SUCCESSR  t   origin_addrR   (   R%   R   R   R_   t   initial_window_sizeR   t   rejectR  t   origin_portt	   my_chanidt   server_addrt   server_portR  R   R   R?  R`   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _parse_channel_open  s    

	
		#c         C   sE   | i    } | i   } | i   } |  i t d t i |   d  S(   Ns   Debug msg: (   R  R  R  R  R    t   safe_string(   R%   R   t   always_displayR?  R  (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyRi    s    c         C   sO   z: |  i  i   | |  i j o d  g  h  f S|  i | SWd  |  i  i   Xd  S(   N(   R   R]   R   RU   R^   (   R%   RA   (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   _get_subsystem_handler  s    (   s
   aes128-ctrs
   aes256-ctrs
   aes128-cbcs   blowfish-cbcs
   aes256-cbcs   3des-cbcs
   arcfour128s
   arcfour256(   s	   hmac-sha1s   hmac-md5s   hmac-sha1-96s   hmac-md5-96(   s   ssh-rsas   ssh-dss(   s   diffie-hellman-group1-sha1s"   diffie-hellman-group-exchange-sha1(   s   noneN(   NN(   RP   RQ   RR   R   R   R*   R,   R.   R0   R2   R   t   MODE_CTRR   t   MODE_CBCR   R   RU   RF   R   R   RH   R   R   RJ   R   R   RL   R   R   RN   R   R'   R)   R   R   R   R   R   R   R   t   staticmethodR   R   R   R   R   R   R   R  R  R  R  R  R  R~   R   R  R{   R   R%  R   R&  R'  R  R  R.  R2  R3  R4  R6  R8  R9  R   R  RA  R   RB  RD  R   RH  RJ  RM  RS  R]  R^  R   Rz  R~  Rb  R  R|  R  R  R  R  Rg  R  R  R  R  R  R  Ri  R  R  R  R  R  R  R  R   Rc  Rk  R   t   _request_successt   MSG_CHANNEL_SUCCESSt   _request_failedt   MSG_CHANNEL_FAILUREt   _feedt   MSG_CHANNEL_DATAt   _feed_extendedt   MSG_CHANNEL_EXTENDED_DATAt   _window_adjustt   MSG_CHANNEL_WINDOW_ADJUSTt   _handle_requestt   MSG_CHANNEL_REQUESTt   _handle_eoft   MSG_CHANNEL_EOFt   _handle_closet   MSG_CHANNEL_CLOSERl  (    (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyRg      s    &&&&&&#&


	s			3@		(			
		F-				&;					S16																			
		j		$	*	a						!					V			







(?   RR   t   osRw   R  t   structt   sysRZ   RE  RW   t   paramikoR    t   paramiko.auth_handlerR   t   paramiko.channelR   t   paramiko.commont   paramiko.compressR   R   t   paramiko.dsskeyR   t   paramiko.kex_gexR   t   paramiko.kex_group1R   t   paramiko.messageR	   t   paramiko.packetR
   R   t   paramiko.primesR   t   paramiko.rsakeyR   t   paramiko.serverR   t   paramiko.sftp_clientR   t   paramiko.ssh_exceptionR   R   R   t   Crypto.CipherR   R   R   R   t   Crypto.HashR   R   t   Crypto.UtilR   t   ImportErrort   paramiko.utilR   R   t   atexitt   registert   objectR   RV   R|   Rg   (    (    (    sQ   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\paramiko\transport.pyt   <module>   sH   
"	M-