__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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<U���SrSSKJr SSKJr SSKrSSKrSSKrSSKJ	r	J
r
 SSKJr SSK
Jr SSKJrJrJrJrJrJrJrJrJrJrJr SS	KJr "S
S\5rg)z
SFTP file object
�)�hexlify)�dequeN)�DEBUG�io_sleep)�BufferedFile)�u)�	CMD_CLOSE�CMD_READ�CMD_DATA�	SFTPError�	CMD_WRITE�
CMD_STATUS�	CMD_FSTAT�	CMD_ATTRS�CMD_FSETSTAT�CMD_EXTENDED�int64)�SFTPAttributesc���\rSrSrSrSrS"SjrSrSrS#Sjr	Sr
S	rS
rSr
SrS
rSrSrSrS$SjrSrSrSrSrSrS%SjrS&SjrS'SjrS(SjrSrS(SjrSrSr S r!S!r"g))�SFTPFile�1z�
Proxy object for a file on the remote server, in client mode SFTP.

Instances of this class may be used as context managers in the same way
that built-in Python file objects are.
i�c��[R"U5 XlX l[R"XU5 SUlSUlSUl0Ul0Ul	[R"5UlSUl
[5Ulg)NF)r�__init__�sftp�handle�	_set_mode�	pipelined�_prefetching�_prefetch_done�_prefetch_data�_prefetch_extents�	threading�Lock�_prefetch_lock�_saved_exceptionr�_reqs)�selfrr�mode�bufsizes     �4/usr/lib/python3/dist-packages/paramiko/sftp_file.pyr�SFTPFile.__init__=sq�����d�#��	������t�7�3����!���#��� ���!#���'�n�n�.��� $����W��
�c�"�URSS9 g)NT��async_��_close�r's r*�__del__�SFTPFile.__del__Ks�����4�� r,c�"�URSS9 g)z
Close the file.
Fr.Nr0r2s r*�close�SFTPFile.closeNs��	
���5��!r,c
�f�UR(agURR[SR	[[
UR5555 UR(aURRU5 [R"U5 U(a5URR[S5[UR5 gURR[UR5 g![ a g["[$R&4a gf=f)Nz	close({}))�_closedr�_logr�formatrrrr�_finish_responsesrr6�_async_request�typer	�_request�EOFError�IOError�socket�error)r'r/s  r*r1�SFTPFile._closeTs����<�<���	�	���u�k�0�0��7�4�;�;�3G�1H�I�J��>�>��I�I�'�'��-����4� �	���	�	�(�(��d��Y����L��	�	�"�"�9�d�k�k�:���	������&�	��	�s�!;D�*D�
D0�D0�/D0c�4�[URR55Vs/sHo3SU::dM
UPM nn[U5S:XagUR	SS9 USupVXV-U::agXV-X-:�agURXV-X-U-
U-
5$s snf)NrFc��US$�Nr�)�xs r*�<lambda>�5SFTPFile._data_in_prefetch_requests.<locals>.<lambda>vs��Q�q�Tr,)�key���T)�listr!�values�len�sort�_data_in_prefetch_requests)r'�offset�sizerI�k�
buf_offset�buf_sizes       r*rR�#SFTPFile._data_in_prefetch_requestsps����D�2�2�9�9�;�<�
�<�!�!����A�<�	
�
��q�6�Q�;��	���>��"� ��u��
�� �F�*��� �F�M�1���.�.��!�6�=�:�#=��#H�
�	
��
s
�B�Bc���URR5Vs/sHo"U::dM
UPM nn[U5S:Xag[U5nX-
nU[URU5:�agU$s snf)z�
if a block of data is present in the prefetch buffers, at the given
offset, return the offset of the relevant prefetch buffer.  otherwise,
return None.  this guarantees nothing about the number of bytes
collected in the prefetch buffer so far.
rN)r �keysrP�max)r'rS�irU�indexrVs      r*�_data_in_prefetch_buffers�"SFTPFile._data_in_prefetch_buffers�sq���+�+�0�0�2�B�2�1�6�k�Q�2��B��q�6�Q�;���A����^�
���T�0�0��7�8�8�����
Cs
�	A0�A0c���URUR5nUbOOUR(dUR(aO,URR5 UR
5 MnUcSUlgURUnURU	URU-
nUS:�aUSUURU'X4SnU[U5:a#X1SURURU-'USUnU$)z�
read data out of the prefetch buffer, if possible.  if the data isn't
in the buffer, return None.  otherwise, behaves like a normal read.
NFr)
r^�_realposrr9r�_read_response�_check_exceptionrr rP)r'rTrS�prefetchrVs     r*�_read_prefetch�SFTPFile._read_prefetch�s�����3�3�D�M�M�B�F��!���"�"�d�l�l���I�I�$�$�&��!�!�#���>� %�D����&�&�v�.������'��]�]�V�+�
���>�*2�;�J�*?�D����'���,�H��#�h�-��8@���D����
�
�� 4�5�����H��r,c�X�[XR5nUR(aURU5nUbU$URR[UR[UR5[U55up4U[:wa[S5eUR5$)N�
Expected data)�min�MAX_REQUEST_SIZErrerr?r
rrra�intrr�
get_string)r'rT�data�t�msgs     r*�_read�SFTPFile._read�s����4�.�.�/������&�&�t�,�D��������#�#��d�k�k�5����#7��T��
���
��=��O�,�,��~�~��r,c	��[[U5UR5nURR	[S5[UR[UR5USU5nURRU5 UR(aB[UR5S:�a�URRR5(a�[UR5(ahURR5nURR!U5upVU[":wa[%S5e[UR5(aMhU$)N�dzExpected status)rirPrjrr=r>r
rrrar&�appendr�sock�
recv_ready�popleftrbrr)r'rm�chunk�sftp_async_request�reqrnros       r*�_write�SFTPFile._write�s����C��I�t�4�4�5��!�Y�Y�5�5���J���K�K��$�-�-� ���%�L�
��	
�
�
���,�-��~�~���
�
�O�c�!�d�i�i�n�n�&?�&?�&A�&A��d�j�j�/�/��j�j�(�(�*�����1�1�#�6����
�?�#�$5�6�6�	�d�j�j�/�/��r,c�N�URRRU5 g)a
Set a timeout on read/write operations on the underlying socket or
ssh `.Channel`.

:param float timeout:
    seconds to wait for a pending read/write operation before raising
    ``socket.timeout``, or ``None`` for no timeout

.. seealso:: `.Channel.settimeout`
N)rru�
settimeout)r'�timeouts  r*r~�SFTPFile.settimeout�s��	
�	�	���!�!�'�*r,c�J�URRR5$)z�
Returns the timeout in seconds (as a `float`) associated with the
socket or ssh `.Channel` used for this file.

.. seealso:: `.Channel.gettimeout`
)rru�
gettimeoutr2s r*r��SFTPFile.gettimeout�s���y�y�~�~�(�(�*�*r,c�N�URRRU5 g)z�
Set blocking or non-blocking mode on the underiying socket or ssh
`.Channel`.

:param int blocking:
    0 to set non-blocking mode; non-0 to set blocking mode.

.. seealso:: `.Channel.setblocking`
N)rru�setblocking)r'�blockings  r*r��SFTPFile.setblocking�s��	
�	�	���"�"�8�,r,c��g)z�
Check if the file supports random access.

:return:
    `True` if the file supports random access. If `False`,
    :meth:`seek` will raise an exception
TrHr2s r*�seekable�SFTPFile.seekable�s��r,c�(�UR5 X R:XaU=UlUlOUX R:Xa'U=RU-
slURUlOUR5U-=UlUl[
5Ulg)z@
Set the file's current position.

See `file.seek` for details.
N)�flush�SEEK_SETra�_pos�SEEK_CUR�	_get_size�bytes�_rbuffer)r'rS�whences   r*�seek�
SFTPFile.seeksk��	
�
�
���]�]�"�(.�.�D�M�D�I�
�}�}�
$��I�I���I� �I�I�D�M�(,���(8�6�(A�A�D�M�D�I����
r,c��URR[UR5upU[:wa[S5e[R"U5$)z�
Retrieve information about this file from the remote system.  This is
exactly like `.SFTPClient.stat`, except that it operates on an
already-open file.

:returns:
    an `.SFTPAttributes` object containing attributes about this file.
zExpected attributes)rr?rrrrr�	_from_msg)r'rnros   r*�stat�
SFTPFile.statsD�����#�#�I�t�{�{�;����	�>��1�2�2��'�'��,�,r,c��URR[SR[	UR
5U55 [
5nXlURR[UR
U5 g)z�
Change the mode (permissions) of this file.  The permissions are
unix-style and identical to those used by Python's `os.chmod`
function.

:param int mode: new permissions
zchmod({}, {!r})N)
rr:rr;rrr�st_moder?r)r'r(�attrs   r*�chmod�SFTPFile.chmod sY��	
�	�	����$�+�+�G�D�K�K�,@�$�G�	
�������	�	���<����d�;r,c��URR[SR[	UR
5X55 [
5nXsUlUlURR[UR
U5 g)a
Change the owner (``uid``) and group (``gid``) of this 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 int uid: new owner's uid
:param int gid: new group id
zchown({}, {!r}, {!r})N)rr:rr;rrr�st_uid�st_gidr?r)r'�uid�gidr�s    r*�chown�SFTPFile.chown/sb��	
�	�	����#�*�*�7�4�;�;�+?��J�	
����#&� ���T�[��	�	���<����d�;r,c�l�Uc*[R"5[R"54nURR[SR	[UR5U55 [5nUuUlUl	URR[URU5 g)a
Set the access and modified times of this file.  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 tuple times:
    ``None`` or a tuple of (access time, modified time) in standard
    internet epoch time (seconds since 01 January 1970 GMT)
Nzutime({}, {!r}))�timerr:rr;rrr�st_atime�st_mtimer?r)r'�timesr�s   r*�utime�SFTPFile.utimeAs}���=��Y�Y�[�$�)�)�+�.�E��	�	����$�+�+�G�D�K�K�,@�%�H�	
����',�$��
�t�}��	�	���<����d�;r,c��URR[SR[	UR
5U55 [
5nXlURR[UR
U5 g)z�
Change the size of this file.  This usually extends
or shrinks the size of the file, just like the ``truncate()`` method on
Python file objects.

:param size: the new size of the file
ztruncate({}, {!r})N)
rr:rr;rrr�st_sizer?r)r'rTr�s   r*�truncate�SFTPFile.truncateWsY��	
�	�	����'�.�.�w�t�{�{�/C�T�J�	
�������	�	���<����d�;r,c
���URR[SURU[	U5[	U5U5upVUR5 UR5 UR
5nU$)a�
Ask the server for a hash of a section of this file.  This can be used
to verify a successful upload or download, or for various rsync-like
operations.

The file is hashed from ``offset``, for ``length`` bytes.
If ``length`` is 0, the remainder of the file is hashed.  Thus, if both
``offset`` and ``length`` are zero, the entire file is hashed.

Normally, ``block_size`` will be 0 (the default), and this method will
return a byte string representing the requested hash (for example, a
string of length 16 for MD5, or 20 for SHA-1).  If a non-zero
``block_size`` is given, each chunk of the file (from ``offset`` to
``offset + length``) of ``block_size`` bytes is computed as a separate
hash.  The hash results are all concatenated and returned as a single
string.

For example, ``check('sha1', 0, 1024, 512)`` will return a string of
length 40.  The first 20 bytes will be the SHA-1 of the first 512 bytes
of the file, and the last 20 bytes will be the SHA-1 of the next 512
bytes.

:param str hash_algorithm:
    the name of the hash algorithm to use (normally ``"sha1"`` or
    ``"md5"``)
:param offset:
    offset into the file to begin hashing (0 means to start from the
    beginning)
:param length:
    number of bytes to hash (0 means continue to the end of the file)
:param int block_size:
    number of bytes to hash per result (must not be less than 256; 0
    means to compute only one hash of the entire segment)
:return:
    `str` of bytes representing the hash of each block, concatenated
    together

:raises:
    ``IOError`` -- if the server doesn't support the "check-file"
    extension, or possibly doesn't support the hash algorithm requested

.. note:: Many (most?) servers don't support this extension yet.

.. versionadded:: 1.4
z
check-file)rr?rrr�get_text�
get_remainder)r'�hash_algorithmrS�length�
block_sizernrorms        r*�check�SFTPFile.checkfsc��\���#�#����K�K���&�M��&�M��
���	��������� � �"���r,c��Xlg)ah
Turn on/off the pipelining of write operations to this file.  When
pipelining is on, paramiko won't wait for the server response after
each write operation.  Instead, they're collected as they come in. At
the first non-write operation (including `.close`), all remaining
server responses are collected.  This means that if there was an error
with one of your later writes, an exception might be thrown from within
`.close` instead of `.write`.

By default, files are not pipelined.

:param bool pipelined:
    ``True`` if pipelining should be turned on for this file; ``False``
    otherwise

.. versionadded:: 1.5
N)r)r'rs  r*�
set_pipelined�SFTPFile.set_pipelined�s	��$#�r,Nc��UcUR5Rn/nURnXA:a5[URX-
5nURXE45 XE-
nXA:aM5[
U5S:�aURX25 gg)ae
Pre-fetch the remaining contents of this file in anticipation of future
`.read` calls.  If reading the entire file, pre-fetching can
dramatically improve the download speed by avoiding roundtrip latency.
The file's contents are incrementally buffered in a background thread.

The prefetched data is stored in a buffer until read via the `.read`
method.  Once data has been read, it's removed from the buffer.  The
data may be read in a random order (using `.seek`); chunks of the
buffer that haven't been read will continue to be buffered.

:param int file_size:
    When this is ``None`` (the default), this method calls `stat` to
    determine the remote file size. In some situations, doing so can
    cause exceptions or hangs (see `#562
    <https://github.com/paramiko/paramiko/pull/562>`_); as a
    workaround, one may call `stat` explicitly and pass its value in
    via this parameter.
:param int max_concurrent_requests:
    The maximum number of concurrent read requests to prefetch. See
    `.SFTPClient.get` (its ``max_concurrent_prefetch_requests`` param)
    for details.

.. versionadded:: 1.5.1
.. versionchanged:: 1.16.0
    The ``file_size`` parameter was added (with no default value).
.. versionchanged:: 1.16.1
    The ``file_size`` parameter was made optional for backwards
    compatibility.
.. versionchanged:: 3.3
    Added ``max_concurrent_requests``.
Nr)r�r�rarirjrtrP�_start_prefetch)r'�	file_size�max_concurrent_requests�chunks�nrxs      r*rd�SFTPFile.prefetch�s���B���	�	��+�+�I����M�M���m���-�-�y�}�=�E��M�M�1�*�%�
�J�A��m��v�;��?�� � ��A�r,c#�# �URR[SR[	UR
5U55 /nUHrupEUR
U5(dURXE5(aM3US:�dM;[XPR5nURXF45 XF-
nXV-nUS:�aM7Mt URX25 UH-nURUS5 URUS5v� M/ g7f)a�
Read a set of blocks from the file by (offset, length).  This is more
efficient than doing a series of `.seek` and `.read` calls, since the
prefetch machinery is used to retrieve all the requested blocks at
once.

:param chunks:
    a list of ``(offset, length)`` tuples indicating which sections of
    the file to read
: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: a list of blocks read, in the same order as in ``chunks``

.. versionadded:: 1.5.4
.. versionchanged:: 3.3
    Added ``max_concurrent_prefetch_requests``.
zreadv({}, {!r})r�N)rr:rr;rrr^rRrirjrtr�r��read)r'r�� max_concurrent_prefetch_requests�read_chunksrSrT�
chunk_sizerIs        r*�readv�SFTPFile.readv�s����(	
�	�	����$�+�+�G�D�K�K�,@�&�I�	
���"�L�F��-�-�����0�0��>�>����(� ��'<�'<�=�
��"�"�F�#7�8��$���"��	��(�#�	
���[�K��A��I�I�a��d�O��)�)�A�a�D�/�!��s�A?D�5D�<A	Dc�F�UR5R$! g=frG)r�r�r2s r*r��SFTPFile._get_sizes#��	��9�9�;�&�&�&��	��s�� c��SUlSUl[R"URX4S9nSUlUR
5 g)NTF)�target�args)rrr"�Thread�_prefetch_thread�daemon�start)r'r�r�rns    r*r��SFTPFile._start_prefetchsC�� ���#�������(�(��2�
�����	���	r,c
���UH�up4UbWUR [UR5nXR:a
SSS5 O%SSS5 [R"[
5 MVURRU[UR[U5[U55nUR X44URU'SSS5 M� g!,(df   N�=f!,(df   M�=f�N)r$rPr!r��sleeprrr=r
rrrk)r'r�r�rSr��pf_len�nums       r*r��SFTPFile._prefetch_thread$s���%�N�F�&�2���,�,�!$�T�%;�%;�!<��!�;�!�-�,�;�-��J�J�x�(���)�)�*�*��h����U�6�]�C��K��C��$�$�/5�.>��&�&�s�+�%�$�%�-�,��%�$�s�C�-C�
C	�
C+	c���U[:XaURRU5 gU[
:wa[
S5eUR5nUR X0R;aVURUupgXPRU'URU	[UR5S:XaSUlSSS5 gSSS5 M}![anX@lSnAgSnAff=f!,(df   N-=f)NrhTr)
rr�_convert_status�	Exceptionr%rrrlr$r!r rPr)r'rnror��ermrSr�s        r*�_async_response�SFTPFile._async_response7s����
�?�
*��	�	�)�)�#�.�
���=��O�,�,��~�~�����$�$��0�0�0�%)�%;�%;�C�%@�N�F�26�'�'��/��.�.�s�3��4�1�1�2�a�7�.2��+��%�$�0�%���
�
*�()�%�%���
*��%�$�s$�C�AC(�
C%�C � C%�(
C6c�H�URbURnSUlUeg)z.if there's a saved exception, raise & clear itN)r%)r'rIs  r*rc�SFTPFile._check_exceptionMs+��� � �,��%�%�A�$(�D�!��G�-r,)
r�r rr!r$rr�rar&r%rrr)�rrM)F)r)rrr)T)NNr�)#�__name__�
__module__�__qualname__�__firstlineno__�__doc__rjrr3r6r1rRr^rerpr{r~r�r�r�r�r�r�r�r�r�r�r�rdr�r�r�r�r�rc�__static_attributes__rHr,r*rr1s�������!�"��8
�(�"�< ��,+�+�
-�� � -�
<�<�$<�,
<�:�x#�(,B�\+"�^�	�?�&�,r,r)r��binasciir�collectionsrrBr"r��paramiko.commonrr�
paramiko.filer�
paramiko.utilr�
paramiko.sftpr	r
rrr
rrrrrr�paramiko.sftp_attrrrrHr,r*�<module>r�sK��&�
��
���+�&������.�a�|�ar,

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