CasperSecurity

Current Path : /lib/python3.10/asyncio/__pycache__/
Upload File :
Current File : //lib/python3.10/asyncio/__pycache__/windows_utils.cpython-310.pyc

o

`�wi��@s�dZddlZejdkred��ddlZddlZddlZddlZddlZddl	Z	ddl
Z
dZdZej
Z
ejZe��Zdded	�d
d�ZGdd
�d
�ZGdd�dej�ZdS)z)Various Windows specific bits and pieces.�N�win32z
win32 only)�pipe�Popen�PIPE�
PipeHandlei F)TT)�duplex�
overlapped�bufsizec
Cstjd�t��tt��d�}|rtj}tj	tj
B}||}}ntj}tj
}d|}}|tjO}|dr8|tj
O}|dr@tj
}nd}d}	}
z.t�||tjd||tjtj�}	t�||dtjtj|tj�}
tj|	dd�}|�d�|	|
fWS|	dur�t�|	�|
dur�t�|
��)zELike os.pipe() but with overlapped support and using handles not fds.z\\.\pipe\python-pipe-{:d}-{:d}-)�prefixr�NT�r)�tempfile�mktemp�format�os�getpid�next�
_mmap_counter�_winapi�PIPE_ACCESS_DUPLEX�GENERIC_READ�
GENERIC_WRITE�PIPE_ACCESS_INBOUND�FILE_FLAG_FIRST_PIPE_INSTANCE�FILE_FLAG_OVERLAPPED�CreateNamedPipe�	PIPE_WAIT�NMPWAIT_WAIT_FOREVER�NULL�
CreateFile�
OPEN_EXISTING�ConnectNamedPipe�GetOverlappedResult�CloseHandle)rrr	�address�openmode�access�obsize�ibsize�flags_and_attribs�h1�h2�ov�r-�,/usr/lib/python3.10/asyncio/windows_utils.pyr sJ��


��



rc@sbeZdZdZdd�Zdd�Zedd��Zdd	�Ze	j
d
�dd�Zej
fd
d�Zdd�Zdd�ZdS)rz�Wrapper for an overlapped pipe handle which is vaguely file-object like.

    The IOCP event loop can use these instead of socket objects.
    cCs
||_dS�N��_handle��self�handler-r-r.�__init__Vs
zPipeHandle.__init__cCs2|jdurd|j��}nd}d|jj�d|�d�S)Nzhandle=�closed�<� �>)r1�	__class__�__name__r2r-r-r.�__repr__Ys
zPipeHandle.__repr__cCs|jSr/r0�r3r-r-r.r4`szPipeHandle.handlecCs|jdur	td��|jS)NzI/O operation on closed pipe)r1�
ValueErrorr=r-r-r.�filenods
zPipeHandle.fileno)r#cCs"|jdur||j�d|_dSdSr/r0)r3r#r-r-r.�closeis


�zPipeHandle.closecCs.|jdur|d|��t|d�|��dSdS)Nz	unclosed )�source)r1�ResourceWarningr@)r3�_warnr-r-r.�__del__ns
�zPipeHandle.__del__cCs|Sr/r-r=r-r-r.�	__enter__sszPipeHandle.__enter__cCs|��dSr/)r@)r3�t�v�tbr-r-r.�__exit__vszPipeHandle.__exit__N)r;�
__module__�__qualname__�__doc__r5r<�propertyr4r?rr#r@�warnings�warnrDrErIr-r-r-r.rQs
rcs"eZdZdZd�fdd�	Z�ZS)rz�Replacement for subprocess.Popen using overlapped pipe handles.

    The stdin, stdout, stderr are None or instances of PipeHandle.
    Nc	s�|�d�rJ�|�dd�dksJ�d}}}d}	}
}|tkr1tddd�\}}	t�|tj�}n|}|tkrEtdd�\}
}
t�|
d�}n|}|tkrYtdd�\}}t�|d�}n	|tkr`|}n|}zazt�j	|f|||d	�|��Wn|	|
|fD]}|dur�t
�|�q|�|	dur�t|	�|_
|
dur�t|
�|_|dur�t|�|_W|tkr�t�|�|tkr�t�|�|tkr�t�|�dSdS|tkr�t�|�|tkr�t�|�|tkr�t�|�ww)
N�universal_newlinesr	r)FTT)rr)TFr)�stdin�stdout�stderr)�getrr�msvcrt�open_osfhandler�O_RDONLY�STDOUT�superr5rr#rrQrRrSr@)r3�argsrQrRrS�kwds�	stdin_rfd�
stdout_wfd�
stderr_wfd�stdin_wh�	stdout_rh�	stderr_rh�stdin_rh�	stdout_wh�	stderr_wh�h�r:r-r.r5�sf�
�
�


�

��

�zPopen.__init__)NNN)r;rJrKrLr5�
__classcell__r-r-rfr.r}sr)rL�sys�platform�ImportErrorr�	itertoolsrUr�
subprocessr
rN�__all__�BUFSIZErrX�countrrrrr-r-r-r.�<module>s&
1,
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