CasperSecurity

Current Path : /lib/python3/dist-packages/twisted/internet/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/twisted/internet/__pycache__/_posixstdio.cpython-310.pyc

o

�b��@stdZddlmZddlmZmZmZddlmZm	Z	eej
�Gdd�d��Zeejej
ejej�Gdd�d��Zd	S)
z�Standard input/out/err support.

Future Plans::

    support for stderr, perhaps
    Rewrite to use the reactor instead of an ad-hoc mechanism for connecting
        protocols to transport.

Maintainer: James Y Knight
�)�implementer)�error�
interfaces�process)�failure�logc@seZdZdS)�PipeAddressN)�__name__�
__module__�__qualname__�rr�>/usr/lib/python3/dist-packages/twisted/internet/_posixstdio.pyrsrc@s�eZdZdZdZdZdZd/dd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�ZdS)0�
StandardIONFr�cCsX|dur
ddlm}||_t�||d|�|_t�||d|�|_|j��|j�	|�dS)Nr)�reactor�write�read)
�twisted.internetr�protocolr�
ProcessWriter�_writer�
ProcessReader�_reader�startReading�makeConnection)�self�proto�stdin�stdoutrrrr
�__init__&s
zStandardIO.__init__cC�|jdur|j��dSdS�N)r�loseConnection�rrrr
�loseWriteConnection3�
�zStandardIO.loseWriteConnectioncC�|jdur
|j�|�dSdSr!)rr�r�datarrr
r7�
�zStandardIO.writecCr&r!)r�
writeSequencer'rrr
r*;r)zStandardIO.writeSequencecCs6d|_|jdur
|j��|jdur|j��dSdS�NT)�
disconnectingrr"r�stopReadingr#rrr
r"?s


�zStandardIO.loseConnectioncC�t�Sr!�rr#rrr
�getPeerH�zStandardIO.getPeercCr.r!r/r#rrr
�getHostKr1zStandardIO.getHostcCs|j�|�dSr!)r�dataReceived)r�fdr(rrr
�childDataReceivedOszStandardIO.childDataReceivedcCsJ|jrdS|jjtjkr|dkr|�|�dS|�|�dS|�|�dS)Nr)�disconnected�value�	__class__r�ConnectionDone�_readConnectionLost�_writeConnectionLost�connectionLost)rr4�reasonrrr
�childConnectionLostRszStandardIO.childConnectionLostcCs�d|_|j}|j}|j}d|_|_d|_|dur!|js!|�|�|dur-|js-|�|�z|�|�WdStyCt��YdSwr+)r6rrrr<�
BaseExceptionr�err)rr=rrrrrr
r<_s

�zStandardIO.connectionLostcCsjd|_|jr
|�|�dSt�|jd�}|r3z|��WdSty2t�	�|�t
���YdSwdSr!)rr,r<r�IHalfCloseableProtocolr�writeConnectionLostr?rr@r�Failure�rr=�prrr
r;ts
��zStandardIO._writeConnectionLostcCs`d|_t�|jd�}|r)z|��WdSty(t��|�t	�
��YdSw|�|�dSr!)rrrAr�readConnectionLostr?rr@r<rrCrDrrr
r:�s�zStandardIO._readConnectionLostcCs(|jdur|��dS|j�||�dSr!)r�
stopProducing�registerProducer)r�producer�	streamingrrr
rH�s
zStandardIO.registerProducercCr r!)r�unregisterProducerr#rrr
rK�r%zStandardIO.unregisterProducercCs|��dSr!)r"r#rrr
rG�szStandardIO.stopProducingcCr r!)r�pauseProducingr#rrr
rL�r%zStandardIO.pauseProducingcCr r!)r�resumeProducingr#rrr
rM�r%zStandardIO.resumeProducingcC�|��dS)z3Compatibility only, don't use. Call pauseProducing.N)rLr#rrr
r-��zStandardIO.stopReadingcCrN)z4Compatibility only, don't use. Call resumeProducing.N)rMr#rrr
r�rOzStandardIO.startReadingcC�t��r!��NotImplementedError�rr=rrr
rF��zStandardIO.readConnectionLostcCrPr!rQrSrrr
rB�rTzStandardIO.writeConnectionLost)rrN)r	r
rrrr6r,rr$rr*r"r0r2r5r>r<r;r:rHrKrGrLrMr-rrFrBrrrr
rs4

	

rN)�__doc__�zope.interfacerrrrr�twisted.pythonrr�IAddressr�
ITransport�	IProducer�	IConsumer�IHalfCloseableDescriptorrrrrr
�<module>s�
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY