%PDF- %PDF-
Direktori : /lib/python3/dist-packages/paramiko/__pycache__/ |
Current File : //lib/python3/dist-packages/paramiko/__pycache__/sftp_server.cpython-312.pyc |
� �ec�L � �j � d Z ddlZddlZddlZddlmZmZ ddlmZ ddl m Z mZmZm Z mZ ddlmZ ddlmZ ddlmZ dd lmZmZmZmZ dd lmZ ddl mZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@ eed�ZA G d � de e� ZBddlCmDZD y)z Server-mode SFTP support. � N)�md5�sha1)�util)�BaseSFTP�Message�SFTP_FAILURE�SFTP_PERMISSION_DENIED�SFTP_NO_SUCH_FILE)�SFTPServerInterface)�SFTPAttributes)�DEBUG)�long�string_types�bytes_types�b)�SubsystemHandler)%� CMD_HANDLE� SFTP_DESC� CMD_STATUS�SFTP_EOF�CMD_NAME�SFTP_BAD_MESSAGE�CMD_EXTENDED_REPLY�SFTP_FLAG_READ�SFTP_FLAG_WRITE�SFTP_FLAG_APPEND�SFTP_FLAG_CREATE�SFTP_FLAG_TRUNC�SFTP_FLAG_EXCL� CMD_NAMES�CMD_OPEN� CMD_CLOSE�SFTP_OK�CMD_READ�CMD_DATA� CMD_WRITE� CMD_REMOVE� CMD_RENAME� CMD_MKDIR� CMD_RMDIR�CMD_OPENDIR�CMD_READDIR�CMD_STAT� CMD_ATTRS� CMD_LSTAT� CMD_FSTAT�CMD_SETSTAT�CMD_FSETSTAT�CMD_READLINK�CMD_SYMLINK�CMD_REALPATH�CMD_EXTENDED�SFTP_OP_UNSUPPORTED)r r c � � � e Zd ZdZefd�Z� fd�Zd� Z� fd�Ze d� � Z e d� � Zd� Zdd �Z dd �Zd� Zd� Zd � Zd� Zd� Z� xZS )� SFTPServerz� Server-side SFTP subsystem support. Since this is a `.SubsystemHandler`, it can be (and is meant to be) set as the handler for ``"sftp"`` requests. Use `.Transport.set_subsystem_handler` to activate this class. c �J � t j | � t j | |||� |j � }t j |j � dz � | _ |j � | _ d| _ i | _ i | _ ||g|��i |��| _ y)a� The constructor for SFTPServer is meant to be called from within the `.Transport` as a subsystem handler. ``server`` and any additional parameters or keyword parameters are passed from the original call to `.Transport.set_subsystem_handler`. :param .Channel channel: channel passed from the `.Transport`. :param str name: name of the requested subsystem. :param .ServerInterface server: the server object associated with this channel and subsystem :param sftp_si: a subclass of `.SFTPServerInterface` to use for handling individual requests. z.sftp� N)r �__init__r � get_transportr � get_logger�get_log_channel�logger�get_hexdump�ultra_debug�next_handle� file_table�folder_table�server)�self�channel�namerF �sftp_si�largs�kwargs� transports �6/usr/lib/python3/dist-packages/paramiko/sftp_server.pyr<