__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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]: ~ $
�

�|�gF���"�SrSSKrSSKrSSKrSSKrSSKrSSKJr SSKJ	r	 SSK
JrJrJ
r
JrJrJrJrJrJrJr SSKJr SSKJr SSKJr SS	KJrJr SS
KJr SSKJ r  Sr!"S
S\ 5r""SS\5r#"SS\#5r$"SS\#5r%g)z"
Abstraction for an SSH2 channel.
�N��wraps)�util)
�cMSG_CHANNEL_REQUEST�cMSG_CHANNEL_WINDOW_ADJUST�cMSG_CHANNEL_DATA�cMSG_CHANNEL_EXTENDED_DATA�DEBUG�ERROR�cMSG_CHANNEL_SUCCESS�cMSG_CHANNEL_FAILURE�cMSG_CHANNEL_EOF�cMSG_CHANNEL_CLOSE)�Message)�SSHException)�BufferedFile)�BufferedPipe�PipeTimeout)�pipe)�ClosingContextManagerc�0^�[T5U4Sj5nU$)z�
Decorator for `.Channel` methods which performs an openness check.

:raises:
    `.SSHException` -- If the wrapped method is called on an unopened
    `.Channel`.
c�>�UR(d3UR(d"UR(dUR(d[	S5eT"U/UQ70UD6$)NzChannel is not open)�closed�eof_received�eof_sent�activer)�self�args�kwds�funcs   ��2/usr/lib/python3/dist-packages/paramiko/channel.py�_check�open_only.<locals>._check=sD���
�K�K�� � ��}�}��;�;��4�5�5��D�(�4�(�4�(�(�r)r r"s` r!�	open_onlyr%4s"����4�[�)��)��Mr$c��\rSrSrSrSrSrSr\SDSj5r	\S5r
\S5r\S	5r\SES
j5r
\S5r\S5rS
rSrSr\SFSj5r\S5rSrSrSrSrSrSrSrSrSrSrSrSr Sr!S r"S!r#S"r$S#r%S$r&S%r'S&r(S'r)S(r*S)r+S*r,S+r-S,r.\/S-5r0S.r1S/r2S0r3S1r4S2r5S3r6S4r7S5r8S6r9S7r:S8r;S9r<S:r=S;r>S<r?S=r@S>rAS?rBS@rCSArDSBrESCrFg)G�Channel�Ka�
A secure tunnel across an SSH `.Transport`.  A Channel is meant to behave
like a socket, and has an API that should be indistinguishable from the
Python socket API.

Because SSH2 has a windowing kind of flow control, if you stop reading data
from a Channel and its buffer fills up, the server will be unable to send
you any more data until you read some of it.  (This won't affect other
channels on the same transport -- all channels on a single transport are
flow-controlled independently.)  Similarly, if the server isn't reading
data you send, calls to `send` may block, unless you set a timeout.  This
is exactly like a normal network socket, so it shouldn't be too surprising.

Instances of this class may be used as context managers.
c��XlSUlSUlSUlSUlSUl[
5Ul[
5UlSUl	SUl
SUl[R"5Ul[R"UR5UlSUlSUlSUlSUlSUlSUl[R."5Ul[3U5Ul[6R8"S5UlSUl[R."5UlSUl SUl!SUl"SUl#g)a5
Create a new channel.  The channel is not associated with any
particular session or `.Transport` until the Transport attaches it.
Normally you would only call this method from the constructor of a
subclass of `.Channel`.

:param int chanid:
    the ID of this channel, as passed by an existing `.Transport`.
rNFzparamiko.transport���)$�chanid�
remote_chanid�	transportrrrr�	in_buffer�in_stderr_buffer�timeoutr�ultra_debug�	threading�Lock�lock�	Condition�
out_buffer_cv�in_window_size�out_window_size�in_max_packet_size�out_max_packet_size�in_window_threshold�in_window_sofar�Event�status_event�str�_namer�
get_logger�logger�_pipe�event�event_ready�combine_stderr�exit_status�origin_addr)rr+s  r!�__init__�Channel.__init__\s������������������
�%���� ,���������� ����N�N�$��	�&�0�0����;������ ���"#���#$�� �#$�� � ���%�O�O�-�����[��
��o�o�&:�;�����
��_�_�&��
� ���#��������r$c�4�UR5 g! g=f�N)�close�rs r!�__del__�Channel.__del__�s��	��J�J�L��	��s��c���SRUR5nUR(aUS-
nO�UR(a�UR(aUS-
nUR
(aUS-
nUSRUR5-
n[UR5S:�a'USR[UR55-
nUS[UR5--
nUS	-
nU$)
z?
Return a string representation of this object, for debugging.
z<paramiko.Channel {}z	 (closed)z (EOF received)z (EOF sent)z (open) window={}rz
 in-buffer={}z -> �>)�formatr+rrrrr8�lenr.�reprr-)r�outs  r!�__repr__�Channel.__repr__�s���%�+�+�D�K�K�8���;�;��;��C�
�[�[�� � ��(�(���}�}��}�$���&�-�-�d�.B�.B�C�C�C��4�>�>�"�Q�&���-�-�c�$�.�.�.A�B�B���v��T�^�^�,�,�,���s�
���
r$c��[5nUR[5 URUR5 URS5 UR
S5 URU5 URU5 URU5 URU5 URU5 UR[55 UR5 URRU5 UR5 g)a�
Request a pseudo-terminal from the server.  This is usually used right
after creating a client channel, to ask the server to provide some
basic terminal semantics for a shell invoked with `invoke_shell`.
It isn't necessary (or desirable) to call this method if you're going
to execute a single command with `exec_command`.

:param str term: the terminal type to emulate
    (for example, ``'vt100'``)
:param int width: width (in characters) of the terminal screen
:param int height: height (in characters) of the terminal screen
:param int width_pixels: width (in pixels) of the terminal screen
:param int height_pixels: height (in pixels) of the terminal screen

:raises:
    `.SSHException` -- if the request was rejected or the channel was
    closed
�pty-reqTN)r�add_byter�add_intr,�
add_string�add_boolean�bytes�_event_pendingr-�_send_user_message�_wait_for_event)r�term�width�height�width_pixels�
height_pixels�ms       r!�get_pty�Channel.get_pty�s���6
�I��	�
�
�'�(�	�	�	�$�$�$�%�	���Y��	�
�
�d��	���T��	�	�	�%��	�	�	�&��	�	�	�,��	�	�	�-� �	���U�W���������)�)�!�,����r$c�2�[5nUR[5 URUR5 URS5 UR
S5 UR5 URRU5 UR5 g)a9
Request an interactive shell session on this channel.  If the server
allows it, the channel will then be directly connected to the stdin,
stdout, and stderr of the shell.

Normally you would call `get_pty` before this, in which case the
shell will operate through the pty, and the channel will be connected
to the stdin and stdout of the pty.

When the shell exits, the channel will be closed and can't be reused.
You must open a new channel if you wish to open another shell.

:raises:
    `.SSHException` -- if the request was rejected or the channel was
    closed
�shellTN�rr[rr\r,r]r^r`r-rarb�rrhs  r!�invoke_shell�Channel.invoke_shell�sl��$
�I��	�
�
�'�(�	�	�	�$�$�$�%�	���W��	�
�
�d���������)�)�!�,����r$c�T�[5nUR[5 URUR5 URS5 UR
S5 URU5 UR5 URRU5 UR5 g)a�
Execute a command on the server.  If the server allows it, the channel
will then be directly connected to the stdin, stdout, and stderr of
the command being executed.

When the command finishes executing, the channel will be closed and
can't be reused.  You must open a new channel if you wish to execute
another command.

:param str command: a shell command to execute.

:raises:
    `.SSHException` -- if the request was rejected or the channel was
    closed
�execTNrm)r�commandrhs   r!�exec_command�Channel.exec_command�sx��"
�I��	�
�
�'�(�	�	�	�$�$�$�%�	���V��	�
�
�d��	���W���������)�)�!�,����r$c�T�[5nUR[5 URUR5 URS5 UR
S5 URU5 UR5 URRU5 UR5 g)a�
Request a subsystem on the server (for example, ``sftp``).  If the
server allows it, the channel will then be directly connected to the
requested subsystem.

When the subsystem finishes, the channel will be closed and can't be
reused.

:param str subsystem: name of the subsystem being requested.

:raises:
    `.SSHException` -- if the request was rejected or the channel was
    closed
�	subsystemTNrm)rrwrhs   r!�invoke_subsystem�Channel.invoke_subsystemsx�� 
�I��	�
�
�'�(�	�	�	�$�$�$�%�	���[�!�	�
�
�d��	���Y���������)�)�!�,����r$c�z�[5nUR[5 URUR5 URS5 UR
S5 URU5 URU5 URU5 URU5 URRU5 g)a
Resize the pseudo-terminal.  This can be used to change the width and
height of the terminal emulation created in a previous `get_pty` call.

:param int width: new width (in characters) of the terminal screen
:param int height: new height (in characters) of the terminal screen
:param int width_pixels: new width (in pixels) of the terminal screen
:param int height_pixels: new height (in pixels) of the terminal screen

:raises:
    `.SSHException` -- if the request was rejected or the channel was
    closed
�
window-changeFN�	rr[rr\r,r]r^r-ra)rrdrerfrgrhs      r!�
resize_pty�Channel.resize_ptys���
�I��	�
�
�'�(�	�	�	�$�$�$�%�	���_�%�	�
�
�e��	�	�	�%��	�	�	�&��	�	�	�,��	�	�	�-� ����)�)�!�,r$c��UR5Hup#URX#5 M g![a"nSn[URU5U5eSnAff=f)a
Updates this channel's remote shell environment.

.. note::
    This operation is additive - i.e. the current environment is not
    reset before the given environment variables are set.

.. warning::
    Servers may silently reject some environment variables; see the
    warning in `set_environment_variable` for details.

:param dict environment:
    a dictionary containing the name and respective values to set
:raises:
    `.SSHException` -- if any of the environment variables was rejected
    by the server or the channel was closed
z(Failed to set environment variable "{}".N)�items�set_environment_variablerrS)r�environment�name�value�e�errs      r!�update_environment�Channel.update_environment5sY��&'�,�,�.�K�D�
8��-�-�d�:�/�� �
8�@��"�3�:�:�d�#3�Q�7�7��
8�s�-�
A�A�Ac�6�[5nUR[5 URUR5 URS5 UR
S5 URU5 URU5 URRU5 g)a
Set the value of an environment variable.

.. warning::
    The server may reject this request depending on its ``AcceptEnv``
    setting; such rejections will fail silently (which is common client
    practice for this particular request type). Make sure you
    understand your server's configuration before using!

:param str name: name of the environment variable
:param str value: value of the environment variable

:raises:
    `.SSHException` -- if the request was rejected or the channel was
    closed
�envFNr|)rr�r�rhs    r!r�� Channel.set_environment_variableOsl��$
�I��	�
�
�'�(�	�	�	�$�$�$�%�	���U��	�
�
�e��	���T��	���U�����)�)�!�,r$c�\�UR=(d URR5$)aq
Return true if the remote process has exited and returned an exit
status. You may use this to poll the process status if you don't
want to block in `recv_exit_status`. Note that the server may not
return an exit status in some cases (like bad servers).

:return:
    ``True`` if `recv_exit_status` will return immediately, else
    ``False``.

.. versionadded:: 1.7.3
)rr>�is_setrNs r!�exit_status_ready�Channel.exit_status_readyjs"���{�{�8�d�/�/�6�6�8�8r$c��URR5 URR5(deUR$)a�
Return the exit status from the process on the server.  This is
mostly useful for retrieving the results of an `exec_command`.
If the command hasn't finished yet, this method will wait until
it does, or until the channel is closed.  If no exit status is
provided by the server, -1 is returned.

.. warning::
    In some situations, receiving remote output larger than the current
    `.Transport` or session's ``window_size`` (e.g. that set by the
    ``default_window_size`` kwarg for `.Transport.__init__`) will cause
    `.recv_exit_status` to hang indefinitely if it is called prior to a
    sufficiently large `.Channel.recv` (or if there are no threads
    calling `.Channel.recv` in the background).

    In these cases, ensuring that `.recv_exit_status` is called *after*
    `.Channel.recv` (or, again, using threads) can avoid the hang.

:return: the exit code (as an `int`) of the process on the server.

.. versionadded:: 1.2
)r>�waitr�rGrNs r!�recv_exit_status�Channel.recv_exit_statusys=��.	
����� �� � �'�'�)�)�)�)����r$c��[5nUR[5 URUR5 URS5 UR
S5 URU5 URRU5 g)a
Send the exit status of an executed command to the client.  (This
really only makes sense in server mode.)  Many clients expect to
get some sort of status code back from an executed command after
it completes.

:param int status: the exit code of the process

.. versionadded:: 1.2
�exit-statusFNr|)r�statusrhs   r!�send_exit_status�Channel.send_exit_status�s`��
�I��	�
�
�'�(�	�	�	�$�$�$�%�	���]�#�	�
�
�e��	�	�	�&�����)�)�!�,r$Nc�V�UcSnUc*[R"[R"S55n[	5nUR[5 URUR5 URS5 URS5 URU5 URU5 URU5 URU5 UR5 URRU5 UR5 URRU5 U$)aU
Request an x11 session on this channel.  If the server allows it,
further x11 requests can be made from the server to the client,
when an x11 application is run in a shell session.

From :rfc:`4254`::

    It is RECOMMENDED that the 'x11 authentication cookie' that is
    sent be a fake, random cookie, and that the cookie be checked and
    replaced by the real cookie when a connection request is received.

If you omit the auth_cookie, a new secure random 128-bit value will be
generated, used, and returned.  You will need to use this value to
verify incoming x11 requests and replace them with the actual local
x11 cookie (which requires some knowledge of the x11 protocol).

If a handler is passed in, the handler is called from another thread
whenever a new x11 connection arrives.  The default handler queues up
incoming x11 connections, which may be retrieved using
`.Transport.accept`.  The handler's calling signature is::

    handler(channel: Channel, (address: str, port: int))

:param int screen_number: the x11 screen number (0, 10, etc.)
:param str auth_protocol:
    the name of the X11 authentication method used; if none is given,
    ``"MIT-MAGIC-COOKIE-1"`` is used
:param str auth_cookie:
    hexadecimal string containing the x11 auth cookie; if none is
    given, a secure random 128-bit value is generated
:param bool single_connection:
    if True, only a single x11 connection will be forwarded (by
    default, any number of x11 connections can arrive over this
    session)
:param handler:
    an optional callable handler to use for incoming X11 connections
:return: the auth_cookie used
zMIT-MAGIC-COOKIE-1��x11-reqT)�binascii�hexlify�os�urandomrr[rr\r,r]r^r`r-rarb�_set_x11_handler)r�
screen_number�
auth_protocol�auth_cookie�single_connection�handlerrhs       r!�request_x11�Channel.request_x11�s���^� �0�M���"�*�*�2�:�:�b�>�:�K��I��	�
�
�'�(�	�	�	�$�$�$�%�	���Y��	�
�
�d��	�
�
�'�(�	���]�#�	���[�!�	�	�	�-� ��������)�)�!�,��������'�'��0��r$c�(�[5nUR[5 URUR5 URS5 UR
S5 URRU5 URRU5 g)aH
Request for a forward SSH Agent on this channel.
This is only valid for an ssh-agent from OpenSSH !!!

:param handler:
    a required callable handler to use for incoming SSH Agent
    connections

:return: True if we are ok, else False
    (at that time we always return ok)

:raises: SSHException in case of channel problem.
�[email protected])
rr[rr\r,r]r^r-ra�_set_forward_agent_handler)rr�rhs   r!�request_forward_agent�Channel.request_forward_agent�sj��
�I��	�
�
�'�(�	�	�	�$�$�$�%�	���1�2�	�
�
�e�����)�)�!�,����1�1�'�:�r$c��UR$)z7
Return the `.Transport` associated with this channel.
)r-rNs r!�
get_transport�Channel.get_transports���~�~�r$c��Xlg)z�
Set a name for this channel.  Currently it's only used to set the name
of the channel in logfile entries.  The name can be fetched with the
`get_name` method.

:param str name: new channel name
N�r@)rr�s  r!�set_name�Channel.set_name
s	���
r$c��UR$)zE
Get the name of this channel that was previously set by `set_name`.
r�rNs r!�get_name�Channel.get_names���z�z�r$c��UR$)a
Return the `int` ID # for this channel.

The channel ID is unique across a `.Transport` and usually a small
number.  It's also the number passed to
`.ServerInterface.check_channel_request` when determining whether to
accept a channel request in server mode.
)r+rNs r!�get_id�Channel.get_ids���{�{�r$c�v�[5nURR5 URnXlU(a!U(dURR5nURR
5 [U5S:�aURU5 U$!URR
5 f=f)a�
Set whether stderr should be combined into stdout on this channel.
The default is ``False``, but in some cases it may be convenient to
have both streams combined.

If this is ``False``, and `exec_command` is called (or ``invoke_shell``
with no pty), output to stderr will not show up through the `recv`
and `recv_ready` calls.  You will have to use `recv_stderr` and
`recv_stderr_ready` to get stderr output.

If this is ``True``, data will never show up via `recv_stderr` or
`recv_stderr_ready`.

:param bool combine:
    ``True`` if stderr output should be combined into stdout on this
    channel.
:return: the previous setting (a `bool`).

.. versionadded:: 1.1
r)	r_r4�acquirerFr/�empty�releaserT�_feed)r�combine�data�olds    r!�set_combine_stderr�Channel.set_combine_stderr%s���*�w���	�	����	 ��%�%�C�")���s��,�,�2�2�4���I�I�����t�9�q�=��J�J�t���
��
�I�I����s�:B�B8c��Xlg)a�
Set a timeout on blocking read/write operations.  The ``timeout``
argument can be a nonnegative float expressing seconds, or ``None``.
If a float is given, subsequent channel read/write operations will
raise a timeout exception if the timeout period value has elapsed
before the operation has completed.  Setting a timeout of ``None``
disables timeouts on socket operations.

``chan.settimeout(0.0)`` is equivalent to ``chan.setblocking(0)``;
``chan.settimeout(None)`` is equivalent to ``chan.setblocking(1)``.

:param float timeout:
    seconds to wait for a pending read/write operation before raising
    ``socket.timeout``, or ``None`` for no timeout.
N�r0)rr0s  r!�
settimeout�Channel.settimeoutJs	�� �r$c��UR$)z�
Returns the timeout in seconds (as a float) associated with socket
operations, or ``None`` if no timeout is set.  This reflects the last
call to `setblocking` or `settimeout`.
r�rNs r!�
gettimeout�Channel.gettimeout\s���|�|�r$c�X�U(aURS5 gURS5 g)a�
Set blocking or non-blocking mode of the channel: if ``blocking`` is 0,
the channel is set to non-blocking mode; otherwise it's set to blocking
mode. Initially all channels are in blocking mode.

In non-blocking mode, if a `recv` call doesn't find any data, or if a
`send` call can't immediately dispose of the data, an error exception
is raised. In blocking mode, the calls block until they can proceed. An
EOF condition is considered "immediate data" for `recv`, so if the
channel is closed in the read direction, it will never block.

``chan.setblocking(0)`` is equivalent to ``chan.settimeout(0)``;
``chan.setblocking(1)`` is equivalent to ``chan.settimeout(None)``.

:param int blocking:
    0 to set non-blocking mode; non-0 to set blocking mode.
N�)r�)r�blockings  r!�setblocking�Channel.setblockingds��$��O�O�D�!��O�O�C� r$c�6�URR5$)z�
Return the address of the remote side of this Channel, if possible.

This simply wraps `.Transport.getpeername`, used to provide enough of a
socket-like interface to allow asyncore to work. (asyncore likes to
call ``'getpeername'``.)
)r-�getpeernamerNs r!r��Channel.getpeername{s���~�~�)�)�+�+r$c��URR5 URb!URR5 SUlUR(aUR
(aURR
5 gUR5nURR
5 UH#nUcMURRU5 M% g!URR
5 f=f)a
Close the channel.  All future read/write operations on the channel
will fail.  The remote end will receive no more data (after queued data
is flushed).  Channels are automatically closed when their `.Transport`
is closed or when they are garbage collected.
N)
r4r�rCrMrrr��_close_internalr-ra)r�msgsrhs   r!rM�
Channel.close�s���	
�	�	����
	 �
�z�z�%��
�
� � �"�!��
��;�;�$�+�+��
�I�I�����'�'�)�D��I�I�����A��}����1�1�!�4���
�I�I����s�AC�C�C8c�6�URR5$)a>
Returns true if data is buffered and ready to be read from this
channel.  A ``False`` result does not mean that the channel has closed;
it means you may need to wait before more data arrives.

:return:
    ``True`` if a `recv` call on this channel would immediately return
    at least one byte; ``False`` otherwise.
)r.�
read_readyrNs r!�
recv_ready�Channel.recv_ready�s���~�~�(�(�*�*r$c��URRXR5nUR[
U55nUS:�af[5nUR[5 URUR5 URU5 URRU5 U$![a [R"5ef=f)a�
Receive data from the channel.  The return value is a string
representing the data received.  The maximum amount of data to be
received at once is specified by ``nbytes``.  If a string of
length zero is returned, the channel stream has closed.

:param int nbytes: maximum number of bytes to read.
:return: received data, as a `bytes`.

:raises socket.timeout:
    if no data is ready before the timeout set by `settimeout`.
r)r.�readr0r�socket�_check_add_windowrTrr[rr\r,r-ra�r�nbytesrV�ackrhs     r!�recv�Channel.recv�s���	#��.�.�%�%�f�l�l�;�C��$�$�S��X�.����7��	�A�
�J�J�1�2�
�I�I�d�(�(�)�
�I�I�c�N��N�N�-�-�a�0��
���	#��.�.�"�"�	#���%B/�/ Cc�6�URR5$)ac
Returns true if data is buffered and ready to be read from this
channel's stderr stream.  Only channels using `exec_command` or
`invoke_shell` without a pty will ever have data on the stderr
stream.

:return:
    ``True`` if a `recv_stderr` call on this channel would immediately
    return at least one byte; ``False`` otherwise.

.. versionadded:: 1.1
)r/r�rNs r!�recv_stderr_ready�Channel.recv_stderr_ready�s���$�$�/�/�1�1r$c��URRXR5nUR[
U55nUS:�af[5nUR[5 URUR5 URU5 URRU5 U$![a [R"5ef=f)a<
Receive data from the channel's stderr stream.  Only channels using
`exec_command` or `invoke_shell` without a pty will ever have data
on the stderr stream.  The return value is a string representing the
data received.  The maximum amount of data to be received at once is
specified by ``nbytes``.  If a string of length zero is returned, the
channel stream has closed.

:param int nbytes: maximum number of bytes to read.
:return: received data as a `bytes`

:raises socket.timeout: if no data is ready before the timeout set by
    `settimeout`.

.. versionadded:: 1.1
r)r/r�r0rr�r�rTrr[rr\r,r-rar�s     r!�recv_stderr�Channel.recv_stderr�s���"	#��'�'�,�,�V�\�\�B�C��$�$�S��X�.����7��	�A�
�J�J�1�2�
�I�I�d�(�(�)�
�I�I�c�N��N�N�-�-�a�0��
���	#��.�.�"�"�	#�r�c�D�URR5 UR(dUR(aURR	5 gUR
S:�URR	5 $!URR	5 f=f)a�
Returns true if data can be written to this channel without blocking.
This means the channel is either closed (so any write attempt would
return immediately) or there is at least one byte of space in the
outbound buffer. If there is at least one byte of space in the
outbound buffer, a `send` call will succeed immediately and return
the number of bytes actually written.

:return:
    ``True`` if a `send` call on this channel would immediately succeed
    or fail
Tr)r4r�rrr�r8rNs r!�
send_ready�Channel.send_ready�sl��	
�	�	����	 ��{�{�d�m�m��
�I�I�����'�'�!�+��I�I�����D�I�I����s�"B�B�Bc��[5nUR[5 URUR5 URX5$)a�
Send data to the channel.  Returns the number of bytes sent, or 0 if
the channel stream is closed.  Applications are responsible for
checking that all data has been sent: if only some of the data was
transmitted, the application needs to attempt delivery of the remaining
data.

:param bytes s: data to send
:return: number of bytes actually sent, as an `int`

:raises socket.timeout: if no data could be sent before the timeout set
    by `settimeout`.
)rr[rr\r,�_send�r�srhs   r!�send�Channel.send
s9��
�I��	�
�
�$�%�	�	�	�$�$�$�%��z�z�!��r$c��[5nUR[5 URUR5 URS5 URX5$)a\
Send data to the channel on the "stderr" stream.  This is normally
only used by servers to send output from shell commands -- clients
won't use this.  Returns the number of bytes sent, or 0 if the channel
stream is closed.  Applications are responsible for checking that all
data has been sent: if only some of the data was transmitted, the
application needs to attempt delivery of the remaining data.

:param bytes s: data to send.
:return: number of bytes actually sent, as an `int`.

:raises socket.timeout:
    if no data could be sent before the timeout set by `settimeout`.

.. versionadded:: 1.1
�)rr[r	r\r,r�r�s   r!�send_stderr�Channel.send_stderr!sD��$
�I��	�
�
�-�.�	�	�	�$�$�$�%�	�	�	�!���z�z�!��r$c�N�U(aURU5nXSnU(aMg)ay
Send data to the channel, without allowing partial results.  Unlike
`send`, this method continues to send data from the given string until
either all data has been sent or an error occurs.  Nothing is returned.

:param bytes s: data to send.

:raises socket.timeout:
    if sending stalled for longer than the timeout set by `settimeout`.
:raises socket.error:
    if an error occurred before the entire string was sent.

.. note::
    If the channel is closed while only part of the data has been
    sent, there is no way to determine how much data (if any) was sent.
    This is irritating, but identically follows Python's API.
N)r��rr��sents   r!�sendall�Channel.sendall9s)��$��9�9�Q�<�D��%��A��a�r$c�N�U(aURU5nXSnU(aMg)a�
Send data to the channel's "stderr" stream, without allowing partial
results.  Unlike `send_stderr`, this method continues to send data
from the given bytestring until all data has been sent or an error
occurs. Nothing is returned.

:param bytes s: data to send to the client as "stderr" output.

:raises socket.timeout:
    if sending stalled for longer than the timeout set by `settimeout`.
:raises socket.error:
    if an error occurred before the entire string was sent.

.. versionadded:: 1.1
N)r�r�s   r!�sendall_stderr�Channel.sendall_stderrPs,�� ��#�#�A�&�D��%��A��a�r$c�,�[U/[U5-6$)a
Return a file-like object associated with this channel.  The optional
``mode`` and ``bufsize`` arguments are interpreted the same way as by
the built-in ``file()`` function in Python.

:return: `.ChannelFile` object which can be used for Python file I/O.
)�ChannelFile�list�r�paramss  r!�makefile�Channel.makefilees���d�V�d�6�l�2�4�4r$c�,�[U/[U5-6$)a%
Return a file-like object associated with this channel's stderr
stream.   Only channels using `exec_command` or `invoke_shell`
without a pty will ever have data on the stderr stream.

The optional ``mode`` and ``bufsize`` arguments are interpreted the
same way as by the built-in ``file()`` function in Python.  For a
client, it only makes sense to open this file for reading.  For a
server, it only makes sense to open this file for writing.

:returns:
    `.ChannelStderrFile` object which can be used for Python file I/O.

.. versionadded:: 1.1
)�ChannelStderrFilerrs  r!�makefile_stderr�Channel.makefile_stderros�� !�D�6�D��L�#8�:�:r$c�,�[U/[U5-6$)a�
Return a file-like object associated with this channel's stdin
stream.

The optional ``mode`` and ``bufsize`` arguments are interpreted the
same way as by the built-in ``file()`` function in Python.  For a
client, it only makes sense to open this file for writing.  For a
server, it only makes sense to open this file for reading.

:returns:
    `.ChannelStdinFile` object which can be used for Python file I/O.

.. versionadded:: 2.6
)�ChannelStdinFilerrs  r!�makefile_stdin�Channel.makefile_stdin�s�� �4�&�4��<�"7�9�9r$c�D�URR5 URb4URR5URR	5 $[
R"5Ul[
R"UR5upURRU5 URRU5 URR5URR	5 $!URR	5 f=f)a[
Returns an OS-level file descriptor which can be used for polling, but
but not for reading or writing.  This is primarily to allow Python's
``select`` module to work.

The first time ``fileno`` is called on a channel, a pipe is created to
simulate real OS-level file descriptor (FD) behavior.  Because of this,
two OS-level FDs are created, which will use up FDs faster than normal.
(You won't notice this effect unless you have hundreds of channels
open at the same time.)

:return: an OS-level file descriptor (`int`)

.. warning::
    This method causes channel reads to be slightly less efficient.
)r4r�rC�filenor�r�	make_pipe�make_or_piper.�	set_eventr/)r�p1�p2s   r!r�Channel.fileno�s���"	
�	�	����
	 ��z�z�%��z�z�(�(�*�
�I�I����
���)�D�J��&�&�t�z�z�2�F�B��N�N�$�$�R�(��!�!�+�+�B�/��:�:�$�$�&��I�I�����D�I�I����s�&D�BD�Dc�f�US:XdUS:XaSUlUS:XdUS:XasURR5 UR5nURR	5 Ub*UR
bUR
R
U5 gggg!URR	5 f=f)ah
Shut down one or both halves of the connection.  If ``how`` is 0,
further receives are disallowed.  If ``how`` is 1, further sends
are disallowed.  If ``how`` is 2, further sends and receives are
disallowed.  This closes the stream in one or both directions.

:param int how:
    0 (stop receiving), 1 (stop sending), or 2 (stop receiving and
      sending).
r�r�N)rr4r��	_send_eofr�r-ra)r�howrhs   r!�shutdown�Channel.shutdown�s���
�1�H�#��(� !�D���1�H�#��(��I�I����
$��N�N�$���	�	�!�!�#��}����!;����1�1�!�4�"<�}�
#��
�	�	�!�!�#�s�B�B0c�&�URS5 g)aD
Shutdown the receiving side of this socket, closing the stream in
the incoming direction.  After this call, future reads on this
channel will fail instantly.  This is a convenience method, equivalent
to ``shutdown(0)``, for people who don't make it a habit to
memorize unix constants from the 1970s.

.. versionadded:: 1.2
rN�rrNs r!�
shutdown_read�Channel.shutdown_read����	
�
�
�a�r$c�&�URS5 g)aC
Shutdown the sending side of this socket, closing the stream in
the outgoing direction.  After this call, future writes on this
channel will fail instantly.  This is a convenience method, equivalent
to ``shutdown(1)``, for people who don't make it a habit to
memorize unix constants from the 1970s.

.. versionadded:: 1.2
r�NrrNs r!�shutdown_write�Channel.shutdown_write�r!r$c��UR$rL)rrNs r!�_closed�Channel._closed�s���{�{�r$c�v�Xl[R"URR55UlgrL)r-rrA�get_log_channelrB)rr-s  r!�_set_transport�Channel._set_transport�s$��"���o�o�d�n�n�&D�&D�&F�G��r$c��XlX lUS-UlSUlUR	[
SR
U55 g)N�
rzMax packet in: {} bytes)r7r9r;r<�_logr
rS)r�window_size�max_packet_sizes   r!�_set_window�Channel._set_window�s?��)��"1��$/�"�#4�� � ����	�	�%�2�9�9�/�J�Kr$c���XlX lURRU5UlSUlUR
[SRUR55 g)Nr�zMax packet out: {} bytes)	r,r8r-�_sanitize_packet_sizer:rr.r
rS)rr+r/r0s    r!�_set_remote_channel�Channel._set_remote_channel�sT��#��*��#'�>�>�#G�#G��$
�� �����	�	��-�4�4�T�5M�5M�N�	
r$c��UR[SRUR55 SUlUR
R
5 g)NzSesch channel {} request okT)r.r
rSr+rErD�setrns  r!�_request_success�Channel._request_success�s9���	�	�%�6�=�=�d�k�k�J�K�����
�
����r$c��URR5 UR5nURR5 UH#nUcMURRU5 M% g!URR5 f=frL)r4r�r�r�r-ra�rrhr�s   r!�_request_failed�Channel._request_failedsj���	�	����	 ��'�'�)�D��I�I�����A��}����1�1�!�4���
�I�I����s�A0�0Bc��[U[5(aUnOUR5nURR	U5 grL)�
isinstancer_�
get_binaryr.�feed)rrhr�s   r!r��
Channel._feeds1���a�����A�����A������A�r$c��UR5nUR5nUS:wa&UR[SR	U55 gUR
(aUR
U5 gURRU5 g)Nr�z)unknown extended_data type {}; discarding)	�get_intrAr.rrSrFr�r/rB)rrh�coder�s    r!�_feed_extended�Channel._feed_extendedsi���y�y�{��
�L�L�N���1�9��I�I��B�I�I�$�O�
�
�����J�J�q�M��!�!�&�&�q�)r$c��UR5nURR5 UR(a%UR	[
SR
U55 U=RU-
slURR5 URR5 g!URR5 f=f)Nzwindow up {})rEr4r�r1r.r
rSr8r6�
notify_allr�)rrhr�s   r!�_window_adjust�Channel._window_adjust$s���������	�	����	 �����	�	�%��!6�!6�v�!>�?�� � �F�*� ����)�)�+��I�I�����D�I�I����s�A%B,�,Cc	��UR5nUR5nURRnSnUS:Xa3UR	5UlURR5 SnGOUUS:XaSnGOKUS:Xa}UR5nUR	5nUR	5nUR	5n	UR	5n
UR5nUcSnGO�URXXxX�U5nGO�US:XaUcSnGO�URU5nGO�US:Xa;UR5nUR5n
UcSnGO{URXU
5nGOgUS:Xa*UR5nUcSnGOJURX5nGO7US	:Xa*UR5nUcSnGOURX5nGOUS
:XaZUR	5nUR	5nUR	5n	UR	5n
UcSnO�URXX�U
5nO�US:Xa\UR5nUR5nUR5nUR	5nUcSnO[UR!UUUUU5nOEUS:XaUcSnO9UR#U5nO'UR%[&S
R)U55 SnU(as[+5nU(aUR-[.5 OUR-[05 UR3UR45 URR7U5 gg)NFr�Tzxon-xoffrZrlr�rrrwr{r�r�zUnhandled channel request "{}")�get_text�get_booleanr-�
server_objectrErGr>r8�
get_string�check_channel_pty_request�check_channel_shell_request�check_channel_env_request�check_channel_exec_request�check_channel_subsystem_request�#check_channel_window_change_requestrA�check_channel_x11_request�#check_channel_forward_agent_requestr.r
rSrr[rr
r\r,ra)rrh�key�
want_reply�server�okrcrdre�
pixelwidth�pixelheight�modesr�r��cmdr��
auth_protor�r�s                   r!�_handle_request�Channel._handle_request/s����j�j�l���]�]�_�
����-�-��
���-�� �y�y�{�D�����!�!�#��B�
�J�
��B�
�I�
��<�<�>�D��I�I�K�E��Y�Y�[�F�����J��)�)�+�K��L�L�N�E��~����5�5���z�����G�^��~����7�7��=��
�E�\��<�<�>�D��L�L�N�E��~����5�5�d�%�H��
�F�]��,�,�.�C��~����6�6�t�A��
�K�
��:�:�<�D��~����;�;�D�G��
�O�
#��I�I�K�E��Y�Y�[�F�����J��)�)�+�K��~����?�?���[����I�
� !�
�
�������J��,�,�.�K��I�I�K�M��~����5�5��%���!����0�
0��~����?�?��E���I�I�e�=�D�D�S�I�J��B���	�A���
�
�/�0��
�
�/�0�
�I�I�d�(�(�)��N�N�-�-�a�0�r$c���URR5 UR(dbSUlURR	5 UR
R	5 URbURR5 URR5 UR[SRUR55 g!URR5 f=f)NTzEOF received ({}))
r4r�rr.rMr/rC�set_foreverr�r.r
rSr@rns  r!�_handle_eof�Channel._handle_eof�s����	�	����	 ��$�$�$(��!����$�$�&��%�%�+�+�-��:�:�)��J�J�*�*�,��I�I�����	�	�%�,�3�3�D�J�J�?�@��
�I�I����s�A3C�C5c�h�URR5 UR5nURR	UR
5 URR
5 UH#nUcMURRU5 M% g!URR
5 f=frL)r4r�r�r-�_unlink_channelr+r�rar<s   r!�
_handle_close�Channel._handle_close�s����	�	����	 ��'�'�)�D��N�N�*�*�4�;�;�7��I�I�����A��}����1�1�!�4���
�I�I����s�5B�B1c���[U5nURR5 UR(a[R
"S5eUR
U5nUS:XaURR5 gURUSU5 URR5 URRU5 U$!URR5 f=f)NzSocket is closedr)rTr4r�rr��error�_wait_for_send_windowr�r]r-ra)rr�rh�sizes    r!r��
Channel._send�s����1�v���	�	����	 ��{�{��l�l�#5�6�6��-�-�d�3�D��q�y��
�I�I����
�L�L��5�D��"��I�I����	
���)�)�!�,����	
�I�I����s�>C�C�C(c�f�URR"USUR-S-U-/UQ76 g)Nz[chan z] )rB�logr@)r�level�msgrs    r!r.�Channel._log�s,��������x�$�*�*�4�t�;�c�A�I�D�Ir$c�F�URR5 SUlg)NF)rD�clearrErNs r!r`�Channel._event_pending�s���
�
���� ��r$c���URR5 URR5(deUR(agURR5nUc[
S5nUe)NzChannel closed.)rDr�r�rEr-�
get_exceptionr)rr�s  r!rb�Channel._wait_for_event�s\���
�
�����z�z� � �"�"�"�"������N�N�(�(�*���9��.�/�A��r$c�f�SUlURR5 URR5 URR5 URR5 URR5 URbURR5 gg)NT)rr.rMr/r6rJrDr8r>rCrfrNs r!�_set_closed�Channel._set_closed�s|��������������#�#�%����%�%�'��
�
�����������:�:�!��J�J�"�"�$�"r$c�
�UR(ag[5nUR[5 UR	UR
5 SUlUR
[SRUR55 U$)NTz
EOF sent ({}))
rrr[rr\r,r.r
rSr@rns  r!r�Channel._send_eof�s[���=�=���I��	�
�
�#�$�	�	�	�$�$�$�%���
��	�	�%��/�/��
�
�;�<��r$c��UR(aUR(agUR5n[5nUR	[
5 UR
UR5 UR5 X4$)N)NN)	rrrrr[rr\r,r~)r�m1�m2s   r!r��Channel._close_internal�sY���{�{�d�k�k��
�^�^�
��
�Y��
���&�'�
�
�
�4�%�%�&������v�
r$c�:�UR(agURR5 UR5 URRUR5 URR5 g!URR5 f=frL)rr4r�r~r-rjr+r�rNs r!�_unlink�Channel._unlink�sf���;�;���	�	����	 ������N�N�*�*�4�;�;�7��I�I�����D�I�I����s�5A>�>Bc���URR5 UR(d"UR(dUR(dURR5 gUR(a%UR[SRU55 U=RU-
sl
URUR::aURR5 gUR(a/UR[SRUR55 URnSUl
UURR5 $!URR5 f=f)Nrzaddwindow {}zaddwindow send {})r4r�rrrr�r1r.r
rSr<r;)r�nrVs   r!r��Channel._check_add_window�s���	�	����	 ��{�{�d�/�/�t�{�{��
�I�I��������	�	�%��!6�!6�q�!9�:�� � �A�%� ��#�#�t�'?�'?�?��
�I�I��������	�	��.�5�5�d�6J�6J�K���&�&�C�#$�D� ���I�I�����D�I�I����s�3E�+A%E�,AE�E7c��UR(dUR(agURS:Xa�URS:Xa[R"5eURnURS:Xa�UR(dUR(ag[
R
"5nURRU5 Ub6U[
R
"5U-
-nUS::a[R"5eURS:XaM�UR(dUR(agURU:aURnURS-
U:aURS-
nU=RU-slUR(a/UR[SRUR55 U$)a
(You are already holding the lock.)
Wait for the send window to open up, and allocate up to ``size`` bytes
for transmission.  If no space opens up before the timeout, a timeout
exception is raised.  Returns the number of bytes available to send
(may be less than requested).
rr��@zwindow down to {})
rrr8r0r��timer6r�r:r1r.r
rS)rrpr0�thens    r!ro�Channel._wait_for_send_windowsO���;�;�$�-�-�����1�$��|�|�s�"��n�n�&�&��l�l�G��&�&�!�+��;�;�$�-�-���y�y�{���"�"�'�'��0��&��t�y�y�{�T�1�1�G��#�~�$�n�n�.�.��&�&�!�+��;�;�$�-�-�����$�&��'�'�D��#�#�b�(�4�/��+�+�b�0�D�����$������I�I�e�0�7�7��8L�8L�M�N��r$)r@rCrr+rrFrrrDrErGr.r9r/r7r<r;r4rBrHr6r:r8r,r>r0r-r1)�vt100�P�rr)r�r�rr)rNNFN)G�__name__�
__module__�__qualname__�__firstlineno__�__doc__rIrOrWr%rirortrxr}r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rMr�r�r�r�r�r�r�r�r�rr	r
rrrr#�propertyr&r*r1r5r9r=r�rGrKrcrgrkr�r.r`rbr~rr�r�r�ro�__static_attributes__�r$r!r'r'Ks��� * �X��&������
'��'�R����4����4����2�-��-�2�8��8�2�-��-�4
9� �6-�*������
@��@�D����.���	�!�J�$�!�.,�5�4
+��:
2��B �* �( �0�.�*5�;�$:�" �<5�.
�
�����H�L�	
��5��*�	 �Z1�xA�	5��(J�!��
%�	��
 � �(%r$r'c�4�\rSrSrSrS	SjrSrSrSrSr	g)
ri6a�
A file-like wrapper around `.Channel`.  A ChannelFile is created by calling
`Channel.makefile`.

.. warning::
    To correctly emulate the file object created from a socket's `makefile
    <python:socket.socket.makefile>` method, a `.Channel` and its
    `.ChannelFile` should be able to be closed or garbage-collected
    independently. Currently, closing the `ChannelFile` does nothing but
    flush the buffer.
c�^�Xl[R"U5 URX#5 grL)�channelrrI�	_set_mode)rr��mode�bufsizes    r!rI�ChannelFile.__init__Cs!�������d�#����t�%r$c�8�S[UR5-S-$)z@
Returns a string representation of this object, for debugging.
z<paramiko.ChannelFile from rR)rUr�rNs r!rW�ChannelFile.__repr__Hs��-�t�D�L�L�/A�A�C�G�Gr$c�8�URRU5$rL)r�r��rrps  r!�_read�ChannelFile._readNs���|�|� � ��&�&r$c�N�URRU5 [U5$rL)r�r�rT�rr�s  r!�_write�ChannelFile._writeQs�������T�"��4�y�r$)r�N)�rr*)
r�r�r�r�r�rIrWr�r�r�r�r$r!rr6s��
�&�
H�'�r$rc�$�\rSrSrSrSrSrSrg)riVz[
A file-like wrapper around `.Channel` stderr.

See `Channel.makefile_stderr` for details.
c�8�URRU5$rL)r�r�r�s  r!r��ChannelStderrFile._read]s���|�|�'�'��-�-r$c�N�URRU5 [U5$rL)r�r�rTr�s  r!r��ChannelStderrFile._write`s�����#�#�D�)��4�y�r$r�N)r�r�r�r�r�r�r�r�r�r$r!rrVs���.�r$rc�,^�\rSrSrSrU4SjrSrU=r$)riezY
A file-like wrapper around `.Channel` stdin.

See `Channel.makefile_stdin` for details.
c�V>�[TU]5 URR5 grL)�superrMr�r#)r�	__class__s �r!rM�ChannelStdinFile.closels���
��
�����#�#�%r$r�)r�r�r�r�r�rMr��
__classcell__)r�s@r!rres����&�&r$r)&r�r�r�r�r�r2�	functoolsr�paramikor�paramiko.commonrrrr	r
rrr
rr�paramiko.messager�paramiko.ssh_exceptionr�
paramiko.filer�paramiko.buffered_piperrr�
paramiko.utilrr%r'rrrr�r$r!�<module>r�s~��&��	�
��������%�/�&�<��/��.h�#�h�V'�,��@���	&�{�	&r$

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