__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

�|�g���p�SSKJr SSKrSSKrSSKrSSKrSSKrSSKrSSKJ	r	 SSK
Jr SSKJ
r
 SSKJrJrJr SSKJrJrJrJrJrJrJrJrJrJrJrJrJrJ r J!r!J"r"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+J,r,J-r-J.r.J/r/J0r0J1r1J2r2 SSK3J4r4 SS	K5J6r6 SS
K7J8r8 SSK9J:r:J;r;J<r< Sr=S
r>"SS\\:5r?"SS\?5r@g)�)�hexlifyN)�util)�Channel)�Message)�INFO�DEBUG�o777) �BaseSFTP�CMD_OPENDIR�
CMD_HANDLE�	SFTPError�CMD_READDIR�CMD_NAME�	CMD_CLOSE�SFTP_FLAG_READ�SFTP_FLAG_WRITE�SFTP_FLAG_CREATE�SFTP_FLAG_TRUNC�SFTP_FLAG_APPEND�SFTP_FLAG_EXCL�CMD_OPEN�
CMD_REMOVE�
CMD_RENAME�	CMD_MKDIR�	CMD_RMDIR�CMD_STAT�	CMD_ATTRS�	CMD_LSTAT�CMD_SYMLINK�CMD_SETSTAT�CMD_READLINK�CMD_REALPATH�
CMD_STATUS�CMD_EXTENDED�SFTP_OK�SFTP_EOF�SFTP_NO_SUCH_FILE�SFTP_PERMISSION_DENIED�int64)�SFTPAttributes)�SSHException)�SFTPFile)�ClosingContextManager�b�uc��URS5$![[4a) URS5s$![a Uss$f=ff=f)z�
decode a string as ascii or utf8 if possible (as required by the sftp
protocol).  if neither works, just return a byte string because the server
probably doesn't know the filename's encoding.
�asciizutf-8)�encode�UnicodeError�AttributeError�decode)�ss �6/usr/lib/python3/dist-packages/paramiko/sftp_client.py�_to_unicoder8HsR����x�x�� � ���.�)��	��8�8�G�$�$���	��H�	���s)��A�7�A�A�A�A�A�/c�N^�\rSrSrSrSr\S(Sj5rU4SjrSr	Sr
S)SjrS)S	jrS*S
jr
S+Sjr\rSr\rS
rSr\4SjrSrSrSrSrSrSrSrSrSrSrS,Sjr Sr!Sr"S-Sjr#S.Sjr$S/Sjr%S/S jr&S!r'S"r(S,S#jr)S$r*S%r+S&r,S'r-U=r.$)0�
SFTPClient�Zz�
SFTP client object.

Used to open an SFTP session across an open SSH `.Transport` and perform
remote file operations.

Instances of this class may be used as context managers.
c�F�[R"U5 XlSUlSUl[
R"5UlSUl[R"5Ul[U5[La[URR5n[R "UR#5S-5UlUR'5UlUR)5nUR/[0SR3U55 g![*a [-S5ef=f)ac
Create an SFTP client from an existing `.Channel`.  The channel
should already have requested the ``"sftp"`` subsystem.

An alternate way to create an SFTP client context is by using
`from_transport`.

:param .Channel sock: an open `.Channel` using the ``"sftp"`` subsystem

:raises:
    `.SSHException` -- if there's an exception while negotiating sftp
F�Nz.sftpzEOF during negotiationz*Opened sftp connection (server version {}))r
�__init__�sock�ultra_debug�request_number�	threading�Lock�_lock�_cwd�weakref�WeakValueDictionary�
_expecting�typer�
get_transportr�
get_logger�get_log_channel�logger�get_hexdump�
_send_version�EOFErrorr+�_logr�format)�selfr@�	transport�server_versions    r7r?�SFTPClient.__init__ds���	���$���	� �������^�^�%��
���	�!�5�5�7�����:�� ��	�	�/�/�1�I��/�/��)�)�+�g�5��D�K� )�4�4�6�D��	9�!�/�/�1�N�	
�	�	��8�?�?��
�	
���	9��7�8�8�	9�s�D
�
D c�Z�URX#S9nUcgURS5 U"U5$)a�
Create an SFTP client channel from an open `.Transport`.

Setting the window and packet sizes might affect the transfer speed.
The default settings in the `.Transport` class are the same as in
OpenSSH and should work adequately for both files transfers and
interactive sessions.

:param .Transport t: an open `.Transport` which is already
    authenticated
:param int window_size:
    optional window size for the `.SFTPClient` session.
:param int max_packet_size:
    optional max packet size for the `.SFTPClient` session..

:return:
    a new `.SFTPClient` object, referring to an sftp session (channel)
    across the transport

.. versionchanged:: 1.15
    Added the ``window_size`` and ``max_packet_size`` arguments.
)�window_size�max_packet_sizeN�sftp)�open_session�invoke_subsystem)�cls�trYrZ�chans     r7�from_transport�SFTPClient.from_transport�s<��0�~�~�#��
���<�����f�%��4�y��c�>�[U[5(aUHnUR"X/UQ76 M gURSS5n[TU]"USU-/UR
R
5/[U5-Q76 g)N�%z%%z
[chan %s] )�
isinstance�listrR�replace�superr@�get_name)rT�level�msg�args�m�	__class__s     �r7rR�SFTPClient._log�sw����c�4� � ����	�	�%�*�T�*���+�+�c�4�(�C��G�L���s�"�
��9�9�%�%�'�(�4��:�5�
rcc�d�UR[S5 URR5 g)zK
Close the SFTP session and its underlying channel.

.. versionadded:: 1.4
zsftp session closed.N)rRrr@�close�rTs r7rr�SFTPClient.close�s!��	
�	�	�$�.�/��	�	���rcc��UR$)z�
Return the underlying `.Channel` object for this SFTP session.  This
might be useful for doing things like setting a timeout on the channel.

.. versionadded:: 1.7.1
)r@rss r7�get_channel�SFTPClient.get_channel�s���y�y�rcc�b�URU5Vs/sHo"RPM sn$s snf)a�
Return a list containing the names of the entries in the given
``path``.

The list is in arbitrary order.  It does not include the special
entries ``'.'`` and ``'..'`` even if they are present in the folder.
This method is meant to mirror ``os.listdir`` as closely as possible.
For a list of full `.SFTPAttributes` objects, see `listdir_attr`.

:param str path: path to list (defaults to ``'.'``)
)�listdir_attr�filename)rT�path�fs   r7�listdir�SFTPClient.listdir�s+��%)�$5�$5�d�$;�<�$;�q�
�
�$;�<�<��<s�,c��URU5nUR[SRU55 UR	[
U5up#U[:wa[S5eUR5n/nUR	[U5up#U[:wa[S5eUR5n[U5H[nUR5nUR5n	[R "X8U	5n
US:wdMBUS:wdMJUR#U
5 M] M�![a Of=fUR	[$U5 U$)a]
Return a list containing `.SFTPAttributes` objects corresponding to
files in the given ``path``.  The list is in arbitrary order.  It does
not include the special entries ``'.'`` and ``'..'`` even if they are
present in the folder.

The returned `.SFTPAttributes` objects will each have an additional
field: ``longname``, which may contain a formatted string of the file's
attributes, in unix format.  The content of this string will probably
depend on the SFTP server implementation.

:param str path: path to list (defaults to ``'.'``)
:return: list of `.SFTPAttributes` objects

.. versionadded:: 1.2
�
listdir({!r})�Expected handle�Expected name response�.�..)�_adjust_cwdrRrrS�_requestrrr
�
get_binaryrrQr�get_int�range�get_textr*�	_from_msg�appendr)rTr{r_rl�handle�filelist�count�irz�longname�attrs           r7ry�SFTPClient.listdir_attr�s��"����%���	�	�%��/�/��5�6����{�D�1����
�?��-�.�.����!�����
����{�F�;����H�}�� 8�9�9��K�K�M�E��5�\���<�<�>���<�<�>��%�/�/��x�H����O�(�d�*:��O�O�D�)�"����
��
��	
�
�
�i��(��s�8D!�!
D.�-D.c#�z# �URU5nUR[SRU55 UR	[
U5up4U[:wa[S5eUR5n[5n[U5H4nUR[S5[U5nURU5 M6 UH�nUR5up9[!U	5nUR#5n
X�:XaU[$:XaUR'U5 UR#5n[U5HNnUR)5nUR)5n
[*R,"XLU
5nUS:wdMBUS:wdMJUv� MP M� [5nGM![.a UR	[0U5 gf=f7f)a�
Generator version of `.listdir_attr`.

See the API docs for `.listdir_attr` for overall details.

This function adds one more kwarg on top of `.listdir_attr`:
``read_aheads``, an integer controlling how many
``SSH_FXP_READDIR`` requests are made to the server. The default of 50
should suffice for most file listings as each request/response cycle
may contain multiple files (dependent on server implementation.)

.. versionadded:: 1.15
r�r�Nr�r�)r�rRrrSr�rrr
�
get_stringrgr��_async_requestrJrr��_read_packetrr�r#�_convert_statusr�r*r�rQr)rTr{�read_aheadsr_rlr��numsr��num�pkt_data�new_numr�rzr�r�s               r7�listdir_iter�SFTPClient.listdir_itersz�������%���	�	�%��/�/��5�6����{�D�1����
�?��-�.�.����!���v���%
�
�{�+�A��-�-�d�4�j�+�v�N�C��K�K��$�,� �C�"&�"3�"3�"5�K�A�!�(�+�C�!�k�k�m�G��~��
�?� �0�0��5��K�K�M�E�"�5�\��#&�<�<�>��#&�<�<�>��-�7�7��8� ��%��O�(�d�2B�"&�J�*� �$�v��E��H�
��
�
�i��0��
�s7�A?F;�C.F�4F�<F�F;� F8�5F;�7F8�8F;c�n�URU5nUR[SRX55 SnSU;dSU;a	U[-nSU;dSU;dSU;a	U[
-nSU;aU[[--nSU;aU[[--nSU;aU[[--n[5nUR[XU5upgU[:wa[S5eUR5nUR[S	RX[![#U5555 [%XX#5$)
a�
Open a file on the remote server.  The arguments are the same as for
Python's built-in `python:file` (aka `python:open`).  A file-like
object is returned, which closely mimics the behavior of a normal
Python file object, including the ability to be used as a context
manager.

The mode indicates how the file is to be opened: ``'r'`` for reading,
``'w'`` for writing (truncating an existing file), ``'a'`` for
appending, ``'r+'`` for reading/writing, ``'w+'`` for reading/writing
(truncating an existing file), ``'a+'`` for reading/appending.  The
Python ``'b'`` flag is ignored, since SSH treats all files as binary.
The ``'U'`` flag is supported in a compatible way.

Since 1.5.2, an ``'x'`` flag indicates that the operation should only
succeed if the file was created and did not previously exist.  This has
no direct mapping to Python's file flags, but is commonly known as the
``O_EXCL`` flag in posix.

The file will be buffered in standard Python style by default, but
can be altered with the ``bufsize`` parameter.  ``<=0`` turns off
buffering, ``1`` uses line buffering, and any number greater than 1
(``>1``) uses that specific buffer size.

:param str filename: name of the file to open
:param str mode: mode (Python-style) to open in
:param int bufsize: desired buffering (default: ``-1``)
:return: an `.SFTPFile` object representing the open file

:raises: ``IOError`` -- if the file could not be opened.
zopen({!r}, {!r})r�r�+�w�a�xr�zopen({!r}, {!r}) -> {})r�rRrrSrrrrrrr*r�rrr
r�r/rr,)	rTrz�mode�bufsize�imode�	attrblockr_rlr�s	         r7�open�SFTPClient.openFs#��@�#�#�H�-���	�	�%�+�2�2�8�B�C����4�K�S�D�[��^�#�E��4�K�S�D�[�c�T�k��_�$�E��$�;��%��7�7�E��$�;��%�(8�8�8�E��$�;��%��6�6�E�"�$�	����x��)�D����
�?��-�.�.����!���	�	��$�+�+���'�&�/� 2�
�	
���d�4�4rcc��URU5nUR[SRU55 UR	[
U5 g)z�
Remove the file at the given path.  This only works on files; for
removing folders (directories), use `rmdir`.

:param str path: path (absolute or relative) of the file to remove

:raises: ``IOError`` -- if the path refers to a folder (directory)
zremove({!r})N)r�rRrrSr�r�rTr{s  r7�remove�SFTPClient.remove�s;������%���	�	�%��.�.�t�4�5��
�
�j�$�'rcc��URU5nURU5nUR[SRX55 UR	[
X5 g)a�
Rename a file or folder from ``oldpath`` to ``newpath``.

.. note::
    This method implements 'standard' SFTP ``RENAME`` behavior; those
    seeking the OpenSSH "POSIX rename" extension behavior should use
    `posix_rename`.

:param str oldpath:
    existing name of the file or folder
:param str newpath:
    new name for the file or folder, must not exist already

:raises:
    ``IOError`` -- if ``newpath`` is a folder, or something else goes
    wrong
zrename({!r}, {!r})N)r�rRrrSr�r�rT�oldpath�newpaths   r7�rename�SFTPClient.rename�sL��$�"�"�7�+���"�"�7�+���	�	�%�-�4�4�W�F�G��
�
�j�'�3rcc��URU5nURU5nUR[SRX55 UR	[
SX5 g)a�
Rename a file or folder from ``oldpath`` to ``newpath``, following
posix conventions.

:param str oldpath: existing name of the file or folder
:param str newpath: new name for the file or folder, will be
    overwritten if it already exists

:raises:
    ``IOError`` -- if ``newpath`` is a folder, posix-rename is not
    supported by the server or something else goes wrong

:versionadded: 2.2
zposix_rename({!r}, {!r})z[email protected])r�rRrrSr�r$r�s   r7�posix_rename�SFTPClient.posix_rename�sR���"�"�7�+���"�"�7�+���	�	�%�3�:�:�7�L�M��
�
��4�g�	
rcc��URU5nUR[SRX55 [	5nX#lUR
[X5 g)aC
Create a folder (directory) named ``path`` with numeric mode ``mode``.
The default mode is 0777 (octal).  On some systems, mode is ignored.
Where it is used, the current umask value is first masked out.

:param str path: name of the folder to create
:param int mode: permissions (posix-style) for the newly-created folder
zmkdir({!r}, {!r})N)r�rRrrSr*�st_moder�r�rTr{r�r�s    r7�mkdir�SFTPClient.mkdir�sI������%���	�	�%�,�3�3�D�?�@�������
�
�i��,rcc��URU5nUR[SRU55 UR	[
U5 g)zR
Remove the folder named ``path``.

:param str path: name of the folder to remove
zrmdir({!r})N)r�rRrrSr�rr�s  r7�rmdir�SFTPClient.rmdir�s;������%���	�	�%��-�-�d�3�4��
�
�i��&rcc���URU5nUR[SRU55 UR	[
U5up#U[:wa[S5e[R"U5$)a�
Retrieve information about a file on the remote system.  The return
value is an object whose attributes correspond to the attributes of
Python's ``stat`` structure as returned by ``os.stat``, except that it
contains fewer fields.  An SFTP server may return as much or as little
info as it wants, so the results may vary from server to server.

Unlike a Python `python:stat` object, the result may not be accessed as
a tuple.  This is mostly due to the author's slack factor.

The fields supported are: ``st_mode``, ``st_size``, ``st_uid``,
``st_gid``, ``st_atime``, and ``st_mtime``.

:param str path: the filename to stat
:return:
    an `.SFTPAttributes` object containing attributes about the given
    file
z
stat({!r})�Expected attributes)
r�rRrrSr�rrr
r*r��rTr{r_rls    r7�stat�SFTPClient.stat�sc��&����%���	�	�%��,�,�T�2�3����x��.����	�>��1�2�2��'�'��,�,rcc���URU5nUR[SRU55 UR	[
U5up#U[:wa[S5e[R"U5$)a
Retrieve information about a file on the remote system, without
following symbolic links (shortcuts).  This otherwise behaves exactly
the same as `stat`.

:param str path: the filename to stat
:return:
    an `.SFTPAttributes` object containing attributes about the given
    file
zlstat({!r})r�)
r�rRrrSr�rrr
r*r�r�s    r7�lstat�SFTPClient.lstat�sc������%���	�	�%��-�-�d�3�4����y�$�/����	�>��1�2�2��'�'��,�,rcc��URU5nUR[SRX55 [	U5nUR[X5 g)z�
Create a symbolic link to the ``source`` path at ``destination``.

:param str source: path of the original file
:param str dest: path of the newly created symlink
zsymlink({!r}, {!r})N)r�rRrrSr.r�r)rT�source�dests   r7�symlink�SFTPClient.symlinksE������%���	�	�%�.�5�5�f�C�D��6����
�
�k�6�0rcc��URU5nUR[SRX55 [	5nX#lUR
[X5 g)z�
Change the mode (permissions) of a file.  The permissions are
unix-style and identical to those used by Python's `os.chmod`
function.

:param str path: path of the file to change the permissions of
:param int mode: new permissions
zchmod({!r}, {!r})N)r�rRrrSr*r�r�r r�s    r7�chmod�SFTPClient.chmodsI������%���	�	�%�,�3�3�D�?�@�������
�
�k�4�.rcc���URU5nUR[SRXU55 [	5nX#sUlUlUR[X5 g)a^
Change the owner (``uid``) and group (``gid``) of a file.  As with
Python's `os.chown` function, you must pass both arguments, so if you
only want to change one, use `stat` first to retrieve the current
owner and group.

:param str path: path of the file to change the owner and group of
:param int uid: new owner's uid
:param int gid: new group id
zchown({!r}, {!r}, {!r})N)	r�rRrrSr*�st_uid�st_gidr�r )rTr{�uid�gidr�s     r7�chown�SFTPClient.chownsT������%���	�	�%�2�9�9�$�S�I�J����#&� ���T�[��
�
�k�4�.rcc�(�URU5nUc*[R"5[R"54nUR[SR	X55 [5nUuUlUlUR[X5 g)aT
Set the access and modified times of the file specified by ``path``.
If ``times`` is ``None``, then the file's access and modified times
are set to the current time.  Otherwise, ``times`` must be a 2-tuple
of numbers, of the form ``(atime, mtime)``, which is used to set the
access and modified times, respectively.  This bizarre API is mimicked
from Python for the sake of consistency -- I apologize.

:param str path: path of the file to modify
:param tuple times:
    ``None`` or a tuple of (access time, modified time) in standard
    internet epoch time (seconds since 01 January 1970 GMT)
Nzutime({!r}, {!r}))
r��timerRrrSr*�st_atime�st_mtimer�r )rTr{�timesr�s    r7�utime�SFTPClient.utime0sm������%���=��Y�Y�[�$�)�)�+�.�E��	�	�%�,�3�3�D�@�A����',�$��
�t�}��
�
�k�4�.rcc��URU5nUR[SRX55 [	5nX#lUR
[X5 g)a
Change the size of the file specified by ``path``.  This usually
extends or shrinks the size of the file, just like the `~file.truncate`
method on Python file objects.

:param str path: path of the file to modify
:param int size: the new size of the file
ztruncate({!r}, {!r})N)r�rRrrSr*�st_sizer�r )rTr{�sizer�s    r7�truncate�SFTPClient.truncateFsI������%���	�	�%�/�6�6�t�B�C�������
�
�k�4�.rcc�h�URU5nUR[SRU55 UR	[
U5up#U[:wa[S5eUR5nUS:XagUS:wa[SRU55e[UR55$)z�
Return the target of a symbolic link (shortcut).  You can use
`symlink` to create these.  The result may be either an absolute or
relative pathname.

:param str path: path of the symbolic link file
:return: target path, as a `str`
zreadlink({!r})r�rNr>zReadlink returned {} results)r�rRrrSr�r!rr
r�r8r��rTr{r_rlr�s     r7�readlink�SFTPClient.readlinkUs�������%���	�	�%�)�0�0��6�7����|�T�2�����=��4�5�5����
���A�:���A�:��:�A�A�%�H�I�I��3�>�>�+�,�,rcc�H�URU5nUR[SRU55 UR	[
U5up#U[:wa[S5eUR5nUS:wa[SRU55eUR5$)a
Return the normalized path (on the server) of a given path.  This
can be used to quickly resolve symbolic links or determine what the
server is considering to be the "current folder" (by passing ``'.'``
as ``path``).

:param str path: path to be normalized
:return: normalized form of the given path (as a `str`)

:raises: ``IOError`` -- if the path can't be resolved on the server
znormalize({!r})r�r>zRealpath returned {} results)
r�rRrrSr�r"rr
r�r�r�s     r7�	normalize�SFTPClient.normalizejs�������%���	�	�%�*�1�1�$�7�8����|�T�2�����=��4�5�5����
���A�:��:�A�A�%�H�I�I��|�|�~�rcc�@�UcSUlg[R"URU5R5(d@[R
n[
USR[R"U5U55e[URU55Ulg)a�
Change the "current directory" of this SFTP session.  Since SFTP
doesn't really have the concept of a current working directory, this is
emulated by Paramiko.  Once you use this method to set a working
directory, all operations on this `.SFTPClient` object will be relative
to that path. You can pass in ``None`` to stop using a current working
directory.

:param str path: new current working directory

:raises:
    ``IOError`` -- if the requested path doesn't exist on the server

.. versionadded:: 1.4
Nz{}: {})rFr��S_ISDIRr��errno�ENOTDIRr
rS�os�strerrorr.r�)rTr{�codes   r7�chdir�SFTPClient.chdir�so�� �<��D�I���|�|�D�I�I�d�O�3�3�4�4��=�=�D��D�(�/�/�"�+�+�d�2C�T�"J�K�K��d�n�n�T�*�+��	rcc�R�UR=(a [UR5$)z�
Return the "current working directory" for this SFTP session, as
emulated by Paramiko.  If no directory has been set with `chdir`,
this method will return ``None``.

.. versionadded:: 1.4
)rFr/rss r7�getcwd�SFTPClient.getcwd�s���y�y�)�Q�t�y�y�\�)rcc��SnURS5nURU5 U[U5-
n[U5S:XaU$UbU"XS5 MO)Nri�)�read�write�len)rT�reader�writer�	file_size�callbackr��datas       r7�_transfer_with_callback�"SFTPClient._transfer_with_callback�s\������;�;�u�%�D��L�L����C��I��D��4�y�A�~�����#���)�rcc�T�URUS5nURS5 URXX4S9nSSS5 U(aIURU5nURW:wa%[SR
URU55eU$[5nU$!,(df   Nj=f)aG
Copy the contents of an open file object (``fl``) to the SFTP server as
``remotepath``. Any exception raised by operations will be passed
through.

The SFTP operations use pipelining for speed.

:param fl: opened file or file-like object to copy
:param str remotepath: the destination path on the SFTP server
:param int file_size:
    optional size parameter passed to callback. If none is specified,
    size defaults to 0
:param callable callback:
    optional callback function (form: ``func(int, int)``) that accepts
    the bytes transferred so far and the total bytes to be transferred
    (since 1.7.4)
:param bool confirm:
    whether to do a stat() on the file afterwards to confirm the file
    size (since 1.7.7)

:return:
    an `.SFTPAttributes` object containing attributes about the given
    file.

.. versionadded:: 1.10
�wbT�r�r�r�r�Nzsize mismatch in put!  {} != {})�file�
set_pipelinedrr�r��IOErrorrSr*)	rT�fl�
remotepathr�r��confirm�frr�r6s	         r7�putfo�SFTPClient.putfo�s���6�Y�Y�z�4�
(�B����T�"��/�/��	�0��D�)�
��	�	�*�%�A��y�y�D� ��5�<�<�Q�Y�Y��M���!���� �A���)�
(�s�"B�
B'c��[R"U5Rn[US5nUR	XbXSU5sSSS5 $!,(df   g=f)a�
Copy a local file (``localpath``) to the SFTP server as ``remotepath``.
Any exception raised by operations will be passed through.  This
method is primarily provided as a convenience.

The SFTP operations use pipelining for speed.

:param str localpath: the local file to copy
:param str remotepath: the destination path on the SFTP server. Note
    that the filename should be included. Only specifying a directory
    may result in an error.
:param callable callback:
    optional callback function (form: ``func(int, int)``) that accepts
    the bytes transferred so far and the total bytes to be transferred
:param bool confirm:
    whether to do a stat() on the file afterwards to confirm the file
    size

:return: an `.SFTPAttributes` object containing attributes about the
    given file

.. versionadded:: 1.4
.. versionchanged:: 1.7.4
    ``callback`` and rich attribute return value added.
.. versionchanged:: 1.7.7
    ``confirm`` param added.
�rbN)r�r�r�r�r)rT�	localpathr	r�r
r�rs       r7�put�SFTPClient.put�s@��8�G�G�I�&�.�.�	�
�)�T�
"�b��:�:�b�i�7�K�#�
"�
"�s�A
�

Ac���URU5RnURUS5nU(aURXe5 UR	XrXcS9sSSS5 $!,(df   g=f)a'
Copy a remote file (``remotepath``) from the SFTP server and write to
an open file or file-like object, ``fl``.  Any exception raised by
operations will be passed through.  This method is primarily provided
as a convenience.

:param object remotepath: opened file or file-like object to copy to
:param str fl:
    the destination path on the local host or open file object
:param callable callback:
    optional callback function (form: ``func(int, int)``) that accepts
    the bytes transferred so far and the total bytes to be transferred
:param bool prefetch:
    controls whether prefetching is performed (default: True)
:param int max_concurrent_prefetch_requests:
    The maximum number of concurrent read requests to prefetch. See
    `.SFTPClient.get` (its ``max_concurrent_prefetch_requests`` param)
    for details.
:return: the `number <int>` of bytes written to the opened file object

.. versionadded:: 1.10
.. versionchanged:: 2.8
    Added the ``prefetch`` keyword argument.
.. versionchanged:: 3.3
    Added ``max_concurrent_prefetch_requests``.
rrN)r�r�r��prefetchr)rTr	rr�r� max_concurrent_prefetch_requestsr�rs        r7�getfo�SFTPClient.getfo�s\��D�I�I�j�)�1�1�	�
�Y�Y�z�4�
(�B�����I�H��/�/��	�0��)�
(�
(�s�(A � 
A.c��[US5nURUUUUU5nSSS5 [R"U5nURW:wa%[SR
URU55eg!,(df   NZ=f)a�
Copy a remote file (``remotepath``) from the SFTP server to the local
host as ``localpath``.  Any exception raised by operations will be
passed through.  This method is primarily provided as a convenience.

:param str remotepath: the remote file to copy
:param str localpath: the destination path on the local host
:param callable callback:
    optional callback function (form: ``func(int, int)``) that accepts
    the bytes transferred so far and the total bytes to be transferred
:param bool prefetch:
    controls whether prefetching is performed (default: True)
:param int max_concurrent_prefetch_requests:
    The maximum number of concurrent read requests to prefetch.
    When this is ``None`` (the default), do not limit the number of
    concurrent prefetch requests. Note: OpenSSH's sftp internally
    imposes a limit of 64 concurrent requests, while Paramiko imposes
    no limit by default; consider setting a limit if a file can be
    successfully received with sftp but hangs with Paramiko.

.. versionadded:: 1.4
.. versionchanged:: 1.7.4
    Added the ``callback`` param
.. versionchanged:: 2.8
    Added the ``prefetch`` keyword argument.
.. versionchanged:: 3.3
    Added ``max_concurrent_prefetch_requests``.
rNzsize mismatch in get!  {} != {})r�rr�r�r�rrS)	rTr	rr�rrrr�r6s	         r7�get�SFTPClient.get#s~��H�)�T�
"�b��:�:�����0��D�#�
�G�G�I����9�9����1�8�8����D�I��
��#�
"�s�A7�7
Bc�^�UR"[S5U/UQ76nURU5$�N)r�rJ�_read_response)rTr_rmr�s    r7r��SFTPClient._requestWs.���!�!�$�t�*�a�7�$�7���"�"�3�'�'rcc��URR5 [5nURUR5 UH�n[U[5(aURU5 M+[U[5(aURU5 MS[U[5(aURU5 M{URU5 M� URnXRU'U=RS-
slURR5 URX$5 U$!URR5 f=f)Nr>)rE�acquirer�add_intrBrfr)�	add_int64�intr*�_pack�
add_stringrI�release�_send_packet)rT�fileobjr_rmrl�itemr�s       r7r��SFTPClient._async_request[s����
�
����	!��)�C��K�K��+�+�,����d�E�*�*��M�M�$�'���c�*�*��K�K��%���n�5�5��J�J�s�O��N�N�4�(���%�%�C�#*�O�O�C� ����1�$���J�J��� ����!�!��
��
�J�J��� �s�C&D/�/Ec��UR5up#[	U5nUR5nURR5 X`R;aaUR[SRU55 UcURR5 gURR5 M�URUnURU	URR5 Xa:XaU[:XaURU5 X%4$U[S5LaURX%U5 UcgGM:![an[SRU55eSnAff=f!URR5 f=f)NzServer connection dropped: {}zUnexpected response #{}�NN)r�rQr+rSrr�rEr rIrRrr&r#r�rJ�_async_response)rT�waitforr_r��erlr�r(s        r7r�SFTPClient._read_responsets\���
N��+�+�-����$�-�C��+�+�-�C��J�J��� �
%��o�o�-��I�I�e�%>�%E�%E�c�%J�K����
�
�
�"�"�$��%��
�
�"�"�$��/�/�#�.���O�O�C�(��
�
�"�"�$��~��
�?��(�(��-��v�
��d�4�j�(��'�'���4�����E���
N�"�#B�#I�#I�!�#L�M�M��
N��"�
�
�"�"�$�s)�D<�7E(�;E(�<
E%�E � E%�(Fc��XRR5;a@UR5 UR5 XRR5;aM?ggr)rI�valuesr�_check_exception)rTr(s  r7�_finish_responses�SFTPClient._finish_responses�sB�����/�/�1�1����!��$�$�&����/�/�1�1rcc�(�UR5nUR5nU[:XagU[:Xa[	U5eU[
:Xa[
[RU5eU[:Xa[
[RU5e[
U5e)zE
Raises EOFError or IOError on error status; otherwise does nothing.
N)r�r�r%r&rQr'rr��ENOENTr(�EACCES)rTrlr��texts    r7r��SFTPClient._convert_status�st���{�{�}���|�|�~���7�?��
�X�
��4�.� �
�&�
&��%�,�,��-�-�
�+�
+��%�,�,��-�-��$�-�rcc���[U5nURcU$[U5(aUSS[:XaU$UR[:XaURU-$UR[-U-$)zZ
Return an adjusted path if we're emulating a "current working
directory" for the server.
rr>)r.rFr��b_slashr�s  r7r��SFTPClient._adjust_cwd�sf��
��w���9�9���K��t�9�9��a���g�-��K��9�9����9�9�t�#�#��y�y�7�"�T�)�)rc)rFrIrErNrBr@rAr,)r�)r��2)r����r)rNT)NT)NTN)/�__name__�
__module__�__qualname__�__firstlineno__�__doc__r?�classmethodrarRrrrvr}ryr�r�rr��unlinkr�r�r	r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrr�r�rr4r�r��__static_attributes__�
__classcell__)ros@r7r;r;Zs����&
�P����>� ��=�(�T>�@85�v�D�(��F�4�.
�, $�
-�'�-�4-�$
1�
/�/�"/�,
/�-�*�,,�0	*�
�(�TL�H��)-�
(�\��)-�
0�h(��2#�J'�
 �$
*�
*rcr;c��\rSrSrSrSrg)�SFTPi�z9
An alias for `.SFTPClient` for backwards compatibility.
�N)r@rArBrCrDrGrKrcr7rJrJ�s���	rcrJ)A�binasciirr�r�r�rCr�rG�paramikor�paramiko.channelr�paramiko.messager�paramiko.commonrrr	�
paramiko.sftpr
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)�paramiko.sftp_attrr*�paramiko.ssh_exceptionr+�paramiko.sftp_filer,�
paramiko.utilr-r.r/r8r<r;rJrKrcr7�<module>rVs���(��	������$�$�-�-�!�!�!�!�!�!�!�!�!�F.�/�'�5�5����c
*��0�c
*�L	�:�	rc

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 3.64 KB 0644
_version.cpython-313.pyc File 292 B 0644
_winapi.cpython-313.pyc File 16.39 KB 0644
agent.cpython-313.pyc File 22.25 KB 0644
auth_handler.cpython-313.pyc File 45.82 KB 0644
auth_strategy.cpython-313.pyc File 11.99 KB 0644
ber.cpython-313.pyc File 6.06 KB 0644
buffered_pipe.cpython-313.pyc File 8.82 KB 0644
channel.cpython-313.pyc File 58.82 KB 0644
client.cpython-313.pyc File 30.79 KB 0644
common.cpython-313.pyc File 7 KB 0644
compress.cpython-313.pyc File 1.57 KB 0644
config.cpython-313.pyc File 22.72 KB 0644
dsskey.cpython-313.pyc File 10.98 KB 0644
ecdsakey.cpython-313.pyc File 14.82 KB 0644
ed25519key.cpython-313.pyc File 8.15 KB 0644
file.cpython-313.pyc File 19.55 KB 0644
hostkeys.cpython-313.pyc File 16.65 KB 0644
kex_curve25519.cpython-313.pyc File 7.82 KB 0644
kex_ecdh_nist.cpython-313.pyc File 8.58 KB 0644
kex_gex.cpython-313.pyc File 13.47 KB 0644
kex_group1.cpython-313.pyc File 7.4 KB 0644
kex_group14.cpython-313.pyc File 1.26 KB 0644
kex_group16.cpython-313.pyc File 1.29 KB 0644
kex_gss.cpython-313.pyc File 29.75 KB 0644
message.cpython-313.pyc File 11.6 KB 0644
packet.cpython-313.pyc File 26.31 KB 0644
pipe.cpython-313.pyc File 6.4 KB 0644
pkey.cpython-313.pyc File 35.02 KB 0644
primes.cpython-313.pyc File 4.23 KB 0644
proxy.cpython-313.pyc File 5.03 KB 0644
rsakey.cpython-313.pyc File 9.43 KB 0644
server.cpython-313.pyc File 29.38 KB 0644
sftp.cpython-313.pyc File 7.11 KB 0644
sftp_attr.cpython-313.pyc File 10.42 KB 0644
sftp_client.cpython-313.pyc File 38.72 KB 0644
sftp_file.cpython-313.pyc File 23.91 KB 0644
sftp_handle.cpython-313.pyc File 7.51 KB 0644
sftp_server.cpython-313.pyc File 22.36 KB 0644
sftp_si.cpython-313.pyc File 11.78 KB 0644
ssh_exception.cpython-313.pyc File 9.38 KB 0644
ssh_gss.cpython-313.pyc File 27.47 KB 0644
transport.cpython-313.pyc File 134.97 KB 0644
util.cpython-313.pyc File 12.42 KB 0644
win_openssh.cpython-313.pyc File 2.36 KB 0644
win_pageant.cpython-313.pyc File 4.82 KB 0644
Filemanager