Server IP : 180.180.241.3 / Your IP : 216.73.216.252 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files (x86)/MySQL/MySQL Workbench 6.1 CE/python/site-packages/paramiko/ |
Upload File : |
ó ¤'Sc @ s d Z d d l Z d d l Z d d l m Z m Z d d l Td d l m Z d d l Td d l Td d l Ti e d 6e d 6Z d e e f d „ ƒ YZ d d l m Z d S( s Server-mode SFTP support. iÿÿÿÿN( t MD5t SHA( t *( t SubsystemHandlert sha1t md5t SFTPServerc B s e Z d Z e d „ Z d „ Z d „ Z d „ Z d „ Z e e ƒ Z d „ Z e e ƒ Z d „ Z e d „ Z d d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( sä Server-side SFTP subsystem support. Since this is a L{SubsystemHandler}, it can be (and is meant to be) set as the handler for C{"sftp"} requests. Use L{Transport.set_subsystem_handler} to activate this class. c O sŽ t j | ƒ t j | | | | ƒ | j ƒ } t j | j ƒ d ƒ | _ | j ƒ | _ d | _ i | _ i | _ | | | | Ž | _ d S( sâ The constructor for SFTPServer is meant to be called from within the L{Transport} as a subsystem handler. C{server} and any additional parameters or keyword parameters are passed from the original call to L{Transport.set_subsystem_handler}. @param channel: channel passed from the L{Transport}. @type channel: L{Channel} @param name: name of the requested subsystem. @type name: str @param server: the server object associated with this channel and subsystem @type server: L{ServerInterface} @param sftp_si: a subclass of L{SFTPServerInterface} to use for handling individual requests. @type sftp_si: class s .sftpi N( t BaseSFTPt __init__R t get_transportt utilt get_loggert get_log_channelt loggert get_hexdumpt ultra_debugt next_handlet file_tablet folder_tablet server( t selft channelt nameR t sftp_sit largst kwargst transport( ( s` C:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE/python/site-packages\paramiko\sftp_server.pyR 0 s c C s‰ t t | ƒ t ƒ rW xm | D]4 } t t | ƒ j | d | j j ƒ d | ƒ q Wn. t t | ƒ j | d | j j ƒ d | ƒ d S( Ns [chan s ] ( t issubclasst typet listt superR t _logt sockt get_name( R t levelt msgt m( ( s` C:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE/python/site-packages\paramiko\sftp_server.pyR M s 5c C s\ | | _ | j t d t | ƒ ƒ | j ƒ | j j ƒ xt rWy | j ƒ \ } } Wne t k r} | j t d ƒ d St k rÀ } | j t d t | ƒ ƒ | j t t j ƒ ƒ d SXt | ƒ } | j ƒ } y | j | | | ƒ Wq= t k rS} | j t d t | ƒ ƒ | j t t j ƒ ƒ y | j | t ƒ WqTqTXq= Xq= Wd S( Ns! Started sftp server on channel %ss EOF -- end of sessions Exception on channel: s Exception in server processing: ( R R t DEBUGt reprt _send_server_versionR t session_startedt Truet _read_packett EOFErrort Exceptiont strR t tb_stringst Messaget get_intt _processt _send_statust SFTP_FAILURE( R R R R t tt datat eR# t request_number( ( s` C:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE/python/site-packages\paramiko\sftp_server.pyt start_subsystemT s2 c C s~ | j j ƒ t t | ƒ j ƒ x! | j j ƒ D] } | j ƒ q0 Wx! | j j ƒ D] } | j ƒ qT Wi | _ i | _ d S( N( R t session_endedR R t finish_subsystemR t itervaluest closeR ( R t f( ( s` C:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE/python/site-packages\paramiko\sftp_server.pyR: p s c C s= | t j k r t S| t j k s1 | t j k r5 t St Sd S( s Convert an errno value (as from an C{OSError} or C{IOError}) into a standard SFTP result code. This is a convenience function for trapping exceptions in server code and returning an appropriate result. @param e: an errno code, as from C{OSError.errno}. @type e: int @return: an SFTP error code like L{SFTP_NO_SUCH_FILE}. @rtype: int N( t errnot EACCESt SFTP_PERMISSION_DENIEDt ENOENTt ENOTDIRt SFTP_NO_SUCH_FILER3 ( R6 ( ( s` C:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE/python/site-packages\paramiko\sftp_server.pyt convert_errno{ s c C sà t j d k rd | j | j @r5 t j | | j ƒ n | j | j @rd t j | | j | j ƒ qd n | j | j @r“ t j | | j | j f ƒ n | j | j @r¿ t | d ƒ j | j ƒ n d S( sn Change a file's attributes on the local filesystem. The contents of C{attr} are used to change the permissions, owner, group ownership, and/or modification & access time of the file, depending on which attributes are present in C{attr}. This is meant to be a handy helper function for translating SFTP file requests into local file operations. @param filename: name of the file to alter (should usually be an absolute path). @type filename: str @param attr: attributes to change. @type attr: L{SFTPAttributes} t win32s w+N( t syst platformt _flagst FLAG_PERMISSIONSt ost chmodt st_modet FLAG_UIDGIDt chownt st_uidt st_gidt FLAG_AMTIMEt utimet st_atimet st_mtimet FLAG_SIZEt opent truncatet st_size( t filenamet attr( ( s` C:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE/python/site-packages\paramiko\sftp_server.pyt set_file_attr s c G só t ƒ } | j | ƒ xÀ | D]¸ } t | ƒ t k rE | j | ƒ q t | ƒ t k rg | j | ƒ q t | ƒ t k r‰ | j | ƒ q t | ƒ t k r« | j | ƒ q t d t | ƒ d t t | ƒ ƒ ƒ ‚ q W| j | t | ƒ ƒ d S( Ns unknown type for s type ( R/ t add_intR t intt longt add_int64R- t add_stringt SFTPAttributest _packR, R&