Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /opt/alt/python311/lib64/python3.11/multiprocessing/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python311/lib64/python3.11/multiprocessing/__pycache__/connection.cpython-311.opt-2.pyc
�

�,ds{���gd�ZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddl
mZm
Z
ddlmZejZ	ddlZddlmZmZmZmZn#e$rejdkr�dZYnwxYwd	Zd
Zej��ZdZdgZeed��rdZedgz
Zejdkrd
Zed
gz
Zefd�Z d�Z!d�Z"d�Z#d�Z$Gd�d��Z%erGd�de%��Z&Gd�de%��Z'Gd�de(��Z)d<d�Z*ejdkrd=d�Z+nd=d�Z+Gd�d e(��Z,d!�Z-ejdkrGd"�d#e(��Z.d$�Z/d%Z0d&Z1d'Z2d(Z3d)�Z4d*�Z5Gd+�d,e(��Z6d-�Z7d.�Z8Gd/�d0e)��Z9d1�Z:ejdkrd2�Z;ej<ej=hZ>d>d3�Z?n#ddl@Z@ee@d4��re@jAZBne@jCZBd>d5�Z?ejdkr0d6�ZDd7�ZEejFe'eD��d8�ZGd9�ZHejFe&eG��dSd:�ZDd;�ZEejFe'eD��dS)?)�Client�Listener�Pipe�wait�N�)�util)�AuthenticationError�BufferTooShort)�	reduction)�
WAIT_OBJECT_0�WAIT_ABANDONED_0�WAIT_TIMEOUT�INFINITE�win32i g4@�AF_INET�AF_UNIX�AF_PIPEc�.�tj��|zS�N��time�	monotonic)�timeouts �A/opt/alt/python311/lib64/python3.11/multiprocessing/connection.py�
_init_timeoutr;s���>���g�%�%�c�0�tj��|kSrr)�ts r�_check_timeoutr>s���>���a��rc��	|dkrdS|dkr'tjdtj�����S|dkr>tjdt	j��t
t��fzd���Std	���)
Nr)�	localhostrrz	listener-)�prefix�dirrz\\.\pipe\pyc-%d-%d-�zunrecognized family)	�tempfile�mktempr�get_temp_dir�os�getpid�next�
_mmap_counter�
ValueError��familys r�arbitrary_addressr/Es����������	�9�	�	���k�t�7H�7J�7J�K�K�K�K�	�9�	�	���&<� "�	���T�-�-@�-@�A�'B�GI�K�K�K�	K��.�/�/�/rc���	tjdkr|dkrtd|z���tjdkr-|dkr)tt|��std|z���dSdSdS)NrrzFamily %s is not recognized.r)�sys�platformr,�hasattr�socketr-s r�_validate_familyr5Ss�����|�w���6�Y�#6�#6��7�&�@�A�A�A�
�|�w���6�Y�#6�#6��v�v�&�&�	F��;�f�D�E�E�E���#6�#6�	F�	Frc��	t|��tkrdSt|��tur|�d��rdSt|��tust	j|��rdSt
d|z���)Nrz\\rrzaddress type of %r unrecognized)�type�tuple�str�
startswithr�is_abstract_socket_namespacer,)�addresss r�address_typer=_s����
�G�}�}�����y�	
�g���#�	�	�'�"4�"4�V�"<�"<�	��y�	
�g���#�	�	��!B�7�!K�!K�	��y��:�W�D�E�E�Erc��eZdZdZdd�Zd�Zd�Zd�Zd�Zd�Z	e
d	���Ze
d
���Ze
d���Z
d�Zd
�Zdd�Zd�Zdd�Zdd�Zd�Zdd�Zd�Zd�ZdS)�_ConnectionBaseNTc��|���}|dkrtd���|s|std���||_||_||_dS)Nrzinvalid handlez6at least one of `readable` and `writable` must be True)�	__index__r,�_handle�	_readable�	_writable)�self�handle�readable�writables    r�__init__z_ConnectionBase.__init__usm���!�!�#�#���A�:�:��-�.�.�.��	J��	J��H�J�J�
J����!���!����rc�@�|j�|���dSdSr�rB�_close�rEs r�__del__z_ConnectionBase.__del__�s#���<�#��K�K�M�M�M�M�M�$�#rc�2�|j�td���dS)Nzhandle is closed)rB�OSErrorrMs r�
_check_closedz_ConnectionBase._check_closed�s!���<���,�-�-�-� �rc�2�|jstd���dS)Nzconnection is write-only)rCrPrMs r�_check_readablez_ConnectionBase._check_readable�s%���~�	6��4�5�5�5�	6�	6rc�2�|jstd���dS)Nzconnection is read-only)rDrPrMs r�_check_writablez_ConnectionBase._check_writable�s%���~�	5��3�4�4�4�	5�	5rc�f�|jrd|_n|���td���)NFzbad message length)rDrC�closerPrMs r�_bad_message_lengthz#_ConnectionBase._bad_message_length�s1���>�	�"�D�N�N��J�J�L�L�L��*�+�+�+rc��	|jduSr�rBrMs r�closedz_ConnectionBase.closed�s��.��|�t�#�#rc��	|jSr)rCrMs rrGz_ConnectionBase.readable��
��0��~�rc��	|jSr)rDrMs rrHz_ConnectionBase.writable�r]rc�:�	|���|jSr)rQrBrMs r�filenoz_ConnectionBase.fileno�s��9��������|�rc�j�	|j�*	|���d|_dS#d|_wxYwdSrrKrMs rrWz_ConnectionBase.close�sE��"��<�#�
$����
�
�
�#������t���#�#�#�#�	$�#s�'�	0rc���	|���|���t|��}|jdkr|�d��}|j}|dkrt
d���||krt
d���|�||z
}n-|dkrt
d���||z|krt
d���|�||||z���dS)Nr�Brzoffset is negativezbuffer length < offsetzsize is negativezbuffer length < offset + size)rQrU�
memoryview�itemsize�cast�nbytesr,�_send_bytes)rE�buf�offset�size�m�ns      r�
send_bytesz_ConnectionBase.send_bytes�s���:��������������s�O�O���:��>�>����s���A�
�H���A�:�:��1�2�2�2��v�:�:��5�6�6�6��<��v�:�D�D�
�A�X�X��/�0�0�0�
�d�]�Q�
�
��<�=�=�=�����6�&�4�-�/�0�1�1�1�1�1rc��	|���|���|�t�|����dSr)rQrUrh�_ForkingPickler�dumps�rE�objs  r�sendz_ConnectionBase.send�sQ��'�����������������.�.�s�3�3�4�4�4�4�4rc��	|���|���|�|dkrtd���|�|��}|�|���|���S)Nrznegative maxlength)rQrSr,�_recv_bytesrX�getvalue)rE�	maxlengthris   r�
recv_bytesz_ConnectionBase.recv_bytes�s���	�	
������������� �Y��]�]��1�2�2�2����y�)�)���;��$�$�&�&�&��|�|�~�~�rc�J�	|���|���t|��5}|j}|t	|��z}|dkrtd���||krtd���|���}|���}|||zkr!t|�	�����|�
d��|�|||z||z|z���|cddd��S#1swxYwYdS)Nrznegative offsetzoffset too large)rQrSrdre�lenr,rv�tellr
rw�seek�readinto)rErirjrlre�bytesize�resultrks        r�recv_bytes_intoz_ConnectionBase.recv_bytes_into�so��	�	
������������
��_�_�	���z�H��#�a�&�&�(�H���z�z� �!2�3�3�3��(�"�"� �!3�4�4�4��%�%�'�'�F��;�;�=�=�D��&�4�-�'�'�$�V�_�_�%6�%6�7�7�7��K�K��N�N�N��O�O�A�f��0�%��}��9�:�;�
<�
<�
<��!	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�CD�D�Dc���	|���|���|���}t�|�����Sr)rQrSrvrp�loads�	getbuffer)rEris  r�recvz_ConnectionBase.recv�sV��*���������������� � ���$�$�S�]�]�_�_�5�5�5r�c�~�	|���|���|�|��Sr)rQrS�_poll�rErs  r�pollz_ConnectionBase.poll�s;��=��������������z�z�'�"�"�"rc��|Sr�rMs r�	__enter__z_ConnectionBase.__enter__����rc�.�|���dSr�rW�rE�exc_type�	exc_value�exc_tbs    r�__exit__z_ConnectionBase.__exit__����
�
�����r)TT)rNr)r)r�)�__name__�
__module__�__qualname__rBrIrNrQrSrUrX�propertyr[rGrHr`rWrnrtryr�r�r�r�r�r�rrr?r?rss�������G�	"�	"�	"�	"����.�.�.�6�6�6�5�5�5�,�,�,��$�$��X�$�����X������X�����
$�$�$�2�2�2�2�(5�5�5���������26�6�6�#�#�#�#��������rr?c�B�eZdZ	dZejfd�Zd�Zdd�Zd�Z	d�Z
dS)	�PipeConnectionFc�&�||j��dSrrZ)rE�_CloseHandles  rrLzPipeConnection._closes���L���&�&�&�&�&rc�H�tj|j|d���\}}	|tjkr!tj|jgdt��}n#|����xYw|�d��\}}dS#|�d��\}}wxYw)NT��
overlappedF)	�_winapi�	WriteFilerB�ERROR_IO_PENDING�WaitForMultipleObjects�eventr�cancel�GetOverlappedResult)rEri�ov�err�waitres�nwrittens      rrhzPipeConnection._send_bytess����'���c�d�K�K�K�G�B��	
=��'�2�2�2�%�<���
�E�8�5�5�G���
��	�	�������� "� 6� 6�t� <� <�
��#�#�#��� 6� 6�t� <� <�
��#�<�<�<�<s�1A�B�A*�*B�B!Nc���|jrd|_tj��S|�dnt|d��}	t	j|j|d���\}}	|tjkr!t	j|j	gdt��}n#|����xYw|�d��\}}|dkr<tj��}|�
|�����|S|tjkr|�||��Sn�#|�d��\}}|dkr@tj��}|�
|�����|ccYS|tjkr|�||��ccYSwxYwn/#t"$r"}|jtjkrt(��d}~wwxYwt+d���)NF�Tr�rz.shouldn't get here; expected KeyboardInterrupt)�_got_empty_message�io�BytesIO�minr��ReadFilerBr�r�r�rr�r��writer��ERROR_MORE_DATA�_get_more_datarP�winerror�ERROR_BROKEN_PIPE�EOFError�RuntimeError)	rE�maxsize�bsizer�r�r��nread�f�es	         rrvzPipeConnection._recv_bytes%s���&�
�*/��'��z�|�|�#�&����C���4E�4E���%�.�t�|�U�;?�A�A�A�G�B��D��'�":�:�:�&-�&D�!#��
�E�8�'=�'=�G�����	�	��������%'�%;�%;�D�%A�%A�
��s��!�8�8� "�
���A��G�G�B�L�L�N�N�3�3�3�#$�H� �G�$;�;�;�#'�#6�#6�r�7�#C�#C�C�<��&(�%;�%;�D�%A�%A�
��s��!�8�8� "�
���A��G�G�B�L�L�N�N�3�3�3�#$�H�H�H�H�H� �G�$;�;�;�#'�#6�#6�r�7�#C�#C�C�C�C�C�C�C�C�C�C�<�������z�W�%>�>�>�&�������	����
�O�P�P�Psg�F2�1B	�D$�	B � D$�#AF2�=%F2�#F2�$AF.�F2�(F.�+F2�-F.�.F2�2
G�<G�Gc��|js#tj|j��ddkrdSt	t|g|����S)NrT)r�r��
PeekNamedPiperB�boolrr�s  rr�zPipeConnection._pollEsI���'�
��-�d�l�;�;�A�>�!�C�C��t���d�V�W�-�-�.�.�.rc���|���}tj��}|�|��t	j|j��d}|�*t|��|z|kr|���t	j	|j|d���\}}|�
d��\}}|�|�����|S)NrTr�)r�r�r�r�r�r�rBr{rXr�r�)rEr�r�rir��leftr��rbytess        rr�zPipeConnection._get_more_dataKs����,�,�.�.�C��
���A�
�G�G�C�L�L�L��(���6�6�q�9�D��"�s�3�x�x�$���'@�'@��(�(�*�*�*��&�t�|�T�d�K�K�K�G�B���0�0��6�6�K�F�C�
�G�G�B�L�L�N�N�#�#�#��Hrr)r�r�r�r�r��CloseHandlerLrhrvr�r�r�rrr�r�s�������	�
#��&-�&9�	'�	'�	'�	'�
	(�
	(�
	(�	Q�	Q�	Q�	Q�@	/�	/�	/�
	�
	�
	�
	�
	rr�c��eZdZ	erejfd�ZejZej	Z
nejfd�Zej
ZejZ
efd�Ze
fd�Zd�Zd	d�Zd�ZdS)
�
Connectionc�&�||j��dSrrZ�rErLs  rrLzConnection._closeb����F�4�<� � � � � rc�&�||j��dSrrZr�s  rrLzConnection._closegr�rc�t�t|��}	||j|��}||z}|dkrdS||d�}�))NTr)r{rB)rErir��	remainingrms     r�_sendzConnection._sendlsN����H�H�	�	���d�l�C�(�(�A���N�I��A�~�~����a�b�b�'�C�	rc��tj��}|j}|}|dkr]|||��}t|��}|dkr||krt�td���|�|��||z}|dk�]|S)Nrzgot end of file during message)r�r�rBr{r�rPr�)rErk�readrirFr��chunkrms        r�_recvzConnection._recvus����j�l�l������	��!�m�m��D���+�+�E��E�
�
�A��A�v�v���$�$�"�N�!�"B�C�C�C��I�I�e������N�I��!�m�m��
rc���t|��}|dkrktjdd��}tjd|��}|�|��|�|��|�|��dStjd|��}|dkr,|�|��|�|��dS|�||z��dS)Ni����!i����!Qi@)r{�struct�packr�)rErirm�
pre_header�headers     rrhzConnection._send_bytes�s�����H�H���z�>�>���T�2�.�.�J��[��q�)�)�F��J�J�z�"�"�"��J�J�v�����J�J�s�O�O�O�O�O��[��q�)�)�F��5�y�y��
�
�6�"�"�"��
�
�3�������
�
�6�C�<�(�(�(�(�(rNc�D�|�d��}tjd|�����\}|dkr>|�d��}tjd|�����\}|�||krdS|�|��S)N�r�r��r�)r�r��unpackrw)rEr�rirks    rrvzConnection._recv_bytes�s����j�j��m�m���
�d�C�L�L�N�N�3�3����2�:�:��*�*�Q�-�-�C��M�$������7�7�E�D���4�'�>�>��4��z�z�$���rc�B�t|g|��}t|��Sr)rr�)rEr�rs   rr�zConnection._poll�s���$���!�!���A�w�w�rr)r�r�r�r��_multiprocessing�closesocketrLrt�_writer��_readr(rWr�r�r�r�rhrvr�r�rrr�r�[s��������
�	� 0� <�	!�	!�	!�	!�!�&�� �%��� "��	!�	!�	!�	!�������%����� %����� )�)�)�. � � � �����rr�c�\�eZdZ	d
d�Zd�Zd�Zed���Zed���Zd�Z	d	�Z
dS)rNrc�8�|p|rt|��pt}|pt|��}t|��|dkrt	||��|_nt
|||��|_|�$t|t��std���||_
dS�Nrzauthkey should be a byte string)r=�default_familyr/r5�PipeListener�	_listener�SocketListener�
isinstance�bytes�	TypeError�_authkey)rEr<r.�backlog�authkeys     rrIzListener.__init__�s����#�G�=��W�(=�(=�#�"�	��6�.�v�6�6���� � � ��Y���)�'�7�;�;�D�N�N�+�G�V�W�E�E�D�N���z�'�5�'A�'A���=�>�>�>���
�
�
rc���	|j�td���|j���}|jr*t	||j��t||j��|S)Nzlistener is closed)r�rP�acceptr��deliver_challenge�answer_challenge)rE�cs  rr�zListener.accept�sf��	�
�>�!��.�/�/�/��N�!�!�#�#���=�	/��a���/�/�/��Q��
�.�.�.��rc�T�	|j}|�d|_|���dSdSr)r�rW)rE�listeners  rrWzListener.close�s;��	��>����!�D�N��N�N������ �rc��|jjSr)r��_addressrMs rr<zListener.address�s
���~�&�&rc��|jjSr)r��_last_acceptedrMs r�
last_acceptedzListener.last_accepted�s
���~�,�,rc��|Srr�rMs rr�zListener.__enter__�r�rc�.�|���dSrr�r�s    rr�zListener.__exit__�r�r)NNrN)r�r�r�rIr�rWr�r<r�r�r�r�rrrr�s�������� � � � � �������'�'��X�'��-�-��X�-��������rrc�"�	|pt|��}t|��|dkrt|��}nt|��}|�$t	|t
��st
d���|� t||��t||��|Sr�)	r=r5�
PipeClient�SocketClientr�r�r�r�r�)r<r.r�r�s    rrr�s�����
,�|�G�,�,�F��V����
�����w�������!�!����:�g�u�#=�#=���9�:�:�:�����G�$�$�$��!�W�%�%�%��HrTc��	|r�tj��\}}|�d��|�d��t|�����}t|�����}n8tj��\}}t|d���}t|d���}||fS)NTF�rH�rG)r4�
socketpair�setblockingr��detachr(�pipe)�duplex�s1�s2�c1�c2�fd1�fd2s       rrrs���	��		1��&�(�(�F�B���N�N�4� � � ��N�N�4� � � ��B�I�I�K�K�(�(�B��B�I�I�K�K�(�(�B�B��w�y�y�H�C���C�%�0�0�0�B��C�%�0�0�0�B��2�v�
rc
��	td��}|r4tj}tjtjz}t
t
}}n!tj}tj}dt
}}tj||tjztj	ztj
tjztjzd||tj
tj��}tj||dtjtjtjtj��}tj|tjdd��tj|d���}|�d��\}	}
t)||���}t)||���}||fS)NrrrTr�rr)r/r��PIPE_ACCESS_DUPLEX�GENERIC_READ�
GENERIC_WRITE�BUFSIZE�PIPE_ACCESS_INBOUND�CreateNamedPipe�FILE_FLAG_OVERLAPPED�FILE_FLAG_FIRST_PIPE_INSTANCE�PIPE_TYPE_MESSAGE�PIPE_READMODE_MESSAGE�	PIPE_WAIT�NMPWAIT_WAIT_FOREVER�NULL�
CreateFile�
OPEN_EXISTING�SetNamedPipeHandleState�ConnectNamedPiper�r�)
rr<�openmode�access�obsize�ibsize�h1�h2r��_r�rrs
             rrrs\��	�$�I�.�.���	(��1�H��)�G�,A�A�F�$�g�F�F�F��2�H��*�F���F�F�
�
$��X�� <�<��1�2��%��(E�E���
�
�v�v�w�;��L�����
��V�Q���g�.C��(�'�,����	�'���-�t�T�	�	�	��-�b�T�B�B�B�
��/�/��5�5���3��B��
0�
0�
0��
�B��
0�
0�
0���2�v�
rc�$�eZdZ	dd�Zd�Zd�ZdS)r�rc��tjtt|����|_	tjdkr0|j�tjtjd��|j�d��|j�	|��|j�
|��|j���|_n(#t$r|j����wxYw||_d|_|dkr>t#j|��s*t#j|tj|fd���|_dSd|_dS)N�posixrTrr��args�exitpriority)r4�getattr�_socketr(�name�
setsockopt�
SOL_SOCKET�SO_REUSEADDRr�bind�listen�getsocknamer�rPrW�_familyr�rr;�Finalize�unlink�_unlink)rEr<r.r�s    rrIzSocketListener.__init__FsF���}�W�V�V�%<�%<�=�=���	��w�'�!�!���'�'��(9�(.�(;�Q�@�@�@��L�$�$�T�*�*�*��L���g�&�&�&��L����(�(�(� �L�4�4�6�6�D�M�M���	�	�	��L��� � � ��	�������"����Y���t�'H��'Q�'Q���=��b�i�w�j�q����D�L�L�L� �D�L�L�Ls�B,C�%Dc��|j���\}|_|�d��t	|�����S�NT)r2r�r�rr�r	�rE�ss  rr�zSocketListener.accept_sE��!%��!4�!4�!6�!6���4��	�
�
�d�����!�(�(�*�*�%�%�%rc��	|j���|j}|�d|_|��dSdS#|j}|�d|_|��wwxYwr)r2rWr=)rEr<s  rrWzSocketListener.closedsr��	��L��� � � ��\�F��!�#����������"�!���\�F��!�#���������"���s	�9�AN)r)r�r�r�rIr�rWr�rrr�r�BsK������� � � � �2&�&�&�
����rr�c�:�	t|��}tjtt|����5}|�d��|�|��t|�����cddd��S#1swxYwYdSr?)r=r4r1r�connectr�r	)r<r.rAs   rrrns�����'�
"�
"�F�	�����/�/�	1�	1�&�Q�	�
�
�d����	�	�	�'�����!�(�(�*�*�%�%�&�&�&�&�&�&�&�&�&�&�&�&����&�&�&�&�&�&s�AB�B�Bc�<�eZdZ	dd�Zdd�Zd�Zed���ZdS)	r�Nc���||_|�d���g|_d|_t	jd|j��t	j|tj|j|jfd���|_	dS)NT)�firstz listener created with address=%rrr.)
r��_new_handle�
_handle_queuer�r�	sub_debugr;r��_finalize_pipe_listenerrW)rEr<r�s   rrIzPipeListener.__init__�su��#�D�M�"&�"2�"2��"2�">�">�!?�D��"&�D���N�=�t�}�M�M�M����l�:��(�$�-�8�q����D�J�J�JrFc
�.�tjtjz}|r|tjz}tj|j|tjtjztjztj	tttjtj��Sr)
r�rrrrr�rrr�PIPE_UNLIMITED_INSTANCESrrr)rErG�flagss   rrHzPipeListener._new_handle�sp���.��1M�M�E��
?���>�>���*��
�u��)�G�,I�I��!�"��0�'�7��,�g�l���
rc�D�|j�|�����|j�d��}	t	j|d���}	t	j|jgdt��}n.#|�	��t	j
|���xYw	|�d��\}}nJ#|�d��\}}wxYw#t$r }|j
tjkr�Yd}~nd}~wwxYwt|��S)NrTr�F)rI�appendrH�popr�r#r�r�rr�r�r�rPr��
ERROR_NO_DATAr�)rErFr��resr*r�r�s       rr�zPipeListener.accept�s8����%�%�d�&6�&6�&8�&8�9�9�9��'�+�+�A�.�.�F�
$��-�f��F�F�F��	$�!�8���
�E�8�5�5�C�C����I�I�K�K�K��'��/�/�/������ �3�3�D�9�9�F�A�s�s��R�3�3�D�9�9�F�A�s�#�O�O�O���
�
�
��:��!6�6�6��7�6�6�6�6�����
���� "�&�)�)�)s6�C&�!B�C	�+B,�,C	�	C#�&
D�0D�Dc�b�tjd|��|D]}tj|���dS)Nz closing listener with address=%r)rrJr�r�)�queuer<rFs   rrKz$PipeListener._finalize_pipe_listener�sB���N�=�w�G�G�G��
,�
,���#�F�+�+�+�+�
,�
,rr)F)r�r�r�rIrHr��staticmethodrKr�rrr�r�~sk������	�		�		�		�		�
	�
	�
	�
	�	*�	*�	*�.
�	,�	,�
��	,�	,�	,rr�c	���	t��}		tj|d��tj|tjtjzdtjtjtjtj��}nG#t$r9}|j
tjtjfvst|��r�Yd}~nd}~wwxYw��tj|tjdd��t!|��S)Nr��r)rr��
WaitNamedPiper rrrr!rrPr��ERROR_SEM_TIMEOUT�ERROR_PIPE_BUSYrr"rr�)r<r�hr�s    rrr�s��	�
�O�O��	�
��%�g�t�4�4�4��&��W�1�G�4I�I��w�|�W�%:��0�'�,�������
�
�
��:�g�&?�&-�&=�&?�?�?�BP�QR�BS�BS�?��?�?�?�?�?�����
����	�"	�'�
�w�,�d�D�	�	�	��a� � � s�A.B�
C�/B?�?C�s#CHALLENGE#s	#WELCOME#s	#FAILURE#c��ddl}t|t��s/td�t|�������t
jt��}|�	t|z��|�||d�����}|�
d��}||kr|�	t��dS|�	t��t!d���)Nr� Authkey must be bytes, not {0!s}�md5�zdigest received was wrong)�hmacr�r�r,�formatr7r(�urandom�MESSAGE_LENGTHrn�	CHALLENGE�new�digestry�WELCOME�FAILUREr	��
connectionr�rb�messagerh�responses      rr�r��s����K�K�K��g�u�%�%�F��.�5�5�d�7�m�m�D�D�F�F�	F��j��(�(�G����)�g�-�.�.�.�
�X�X�g�w��
.�
.�
5�
5�
7�
7�F��$�$�S�)�)�H��6������g�&�&�&�&�&����g�&�&�&�!�"=�>�>�>rc���ddl}t|t��s/td�t|�������|�d��}|tt��d�}|�	||d���
��}|�|��|�d��}|tkrtd���dS)Nrr_rar`zdigest sent was rejected)rbr�r�r,rcr7ryr{rfrgrhrnrir	rks      rr�r��s����K�K�K��g�u�%�%�F��.�5�5�d�7�m�m�D�D�F�F�	F��#�#�C�(�(�G��c�)�n�n�o�o�&�G�
�X�X�g�w��
.�
.�
5�
5�
7�
7�F����&�!�!�!��$�$�S�)�)�H��7���!�"<�=�=�=��rc� �eZdZd�Zd�Zd�ZdS)�ConnectionWrapperc�|�||_||_||_dD]#}t||��}t	|||���$dS)N)r`rWr�ryrn)�_conn�_dumps�_loadsr1�setattr)rE�connrqr��attrrss      rrIzConnectionWrapper.__init__�sT����
�������K�	%�	%�D��$��%�%�C��D�$��$�$�$�$�	%�	%rc�d�|�|��}|j�|��dSr)rtrsrn)rErsrAs   rrtzConnectionWrapper.sends/���K�K������
���a� � � � � rc�^�|j���}|�|��Sr)rsryrur@s  rr�zConnectionWrapper.recvs%���J�!�!�#�#���{�{�1�~�~�rN)r�r�r�rIrtr�r�rrrqrq�sA������%�%�%�!�!�!�����rrqc�f�t�|fdddd���d��S)Nr�utf-8)�	xmlrpclibrq�encode)rss r�
_xml_dumpsrs,���?�?�C�6�4��t�Q�7�7�>�>�w�G�G�Grc�j�t�|�d����\\}}|S)Nr|)r}r��decode)rArs�methods   r�
_xml_loadsr�s*���_�_�Q�X�X�g�%6�%6�7�7�N�F�S�F��Jrc��eZdZd�ZdS)�XmlListenerc�x�ddlmat�|��}t|tt��S�Nr)�
xmlrpc.client�clientr}rr�rqrr�rrs  rr�zXmlListener.accepts7��)�)�)�)�)�)��o�o�d�#�#�� ��j�*�=�=�=rN)r�r�r�r�r�rrr�r�s#������>�>�>�>�>rr�c�X�ddlmatt	|i|��t
t��Sr�)r�r�r}rqrrr�)r/�kwdss  r�	XmlClientr�s3��%�%�%�%�%�%��V�T�2�T�2�2�J�
�K�K�Krc��t|��}g}|r�tj|d|��}|tkrn�t|cxkrtt|��zkrnn|tz}nDt|cxkrtt|��zkrnn|tz}ntd���|�||��||dzd�}d}|��|S)NFzShould not get hererr)	�listr�r�rrr{r
r�rP)�handlesr�L�readyrSs     r�_exhaustive_waitr�$s���
��M�M�����	��0��E�7�C�C�C��l�"�"���#�>�>�>�>�
��A���(>�>�>�>�>�>��}�$���!�S�D�D�D�D�+;�c�!�f�f�+D�D�D�D�D�D��'�'���"�#8�9�9�9��L�L��3�� � � ��#�a�%�&�&�	�A��G��	��rc��
��	|�t}n|dkrd}nt|dzdz��}t|��}i�g}t���
t��}	|D�]B}	t	|d��}	tj|��dd��\}}n*#t$r}d|j}}|tvr�Yd}~nd}~wwxYw|t
j
kr |�|��|�|j<��|rptj��dd�dkrQ	|�d��\}	}n#t$r}|j}Yd}~nd}~wwxYw|st!|d	��rd|_�
�|��d}��#t&$r|�|���<Y��@wxYwt+����|��}|D]}|����|D]�}	|�d��\}	}n(#t$r}|j}|tvr�Yd}~nd}~wwxYw|t
jkr?�|j}�
�|��|dkrt!|d	��rd|_��n�#|D]}|����|D]�}	|�d��\}	}n(#t$r}|j}|tvr�Yd}~nd}~wwxYw|t
jkr?�|j}�
�|��|dkrt!|d	��rd|_��wxYw�
��fd
�|D�����
fd�|D��S)NrrXg�?r`T�)�r�Fr�c3�(�K�|]}�|V��
dSrr�)�.0r\�waithandle_to_objs  �r�	<genexpr>zwait.<locals>.<genexpr>�s)�����I�I�a�.�q�1�I�I�I�I�I�Irc���g|]}|�v�|��	Sr�r�)r��o�
ready_objectss  �r�
<listcomp>zwait.<locals>.<listcomp>�s#���=�=�=�a�!�}�*<�*<��*<�*<�*<r)r�intr��setr1r�r�rPr��
_ready_errorsr�rPr�r1�getwindowsversionr�r3r��add�AttributeErrorrAr��keysr��ERROR_OPERATION_ABORTED�update)�object_listr�ov_list�
ready_handlesr�r`r�r�r�r*r�r�s          @@rrr:s]����	�
�?��G�G�
�q�[�[��G�G��'�D�.�3�.�/�/�G��;�'�'���������
����
�6	8� �
$�
$��$�$�Q��1�1�F�
"�")�"2�6�6�8�8�Q��"E�"E���C�C��"�"�"�"�"&��
�C���m�3�3�!�4�3�3�3�3�����"�����g�6�6�6����r�*�*�*�67�)�"�(�3�3�
�<�#�"7�"9�"9�"�1�"�"=��"G�"G�1�)+�)?�)?��)F�)F���3�3��#*�1�1�1�&'�j�����������1����#&�<�7�1�6J�+K�+K�<�7;�� 4�%�)�)�!�,�,�,�"#����7&�9�9�9�78�%�a�k�k�m�m�4�4�4�9����:-�->�-C�-C�-E�-E�w�O�O�M��
�
���	�	������
8�
8����3�3�D�9�9�F�A�s�s�������*�C��-�/�/��0�/�/�/�/����������'�9�9�9�)�"�(�3�A�!�%�%�a�(�(�(��a�x�x�#�1�&:�;�;�8�37�A�0��
8��	�
�
���	�	������
8�
8����3�3�D�9�9�F�A�s�s�������*�C��-�/�/��0�/�/�/�/����������'�9�9�9�)�"�(�3�A�!�%�%�a�(�(�(��a�x�x�#�1�&:�;�;�8�37�A�0��
8���� 	���I�I�I�I�=�I�I�I�I�I�I�=�=�=�=�;�=�=�=�=s��I4�"E:�3!B�I4�
B<�B7�2I4�7B<�<AI4�D*�)I4�*
E�4E�;I4�E�5I4�:!F�I4�F�%I4�"G;�;
H �H�H �4L%�J,�+L%�,
K	�6K	�L%�K	�AL%�PollSelectorc�p�	t��5}|D]"}|�|tj���#|�t	j��|z}	|�|��}|rd�|D��cddd��S|�*|t	j��z
}|dkr|cddd��S�\#1swxYwYdS)NTc�"�g|]\}}|j��
Sr�)�fileobj)r��key�eventss   rr�zwait.<locals>.<listcomp>�s��C�C�C�M�S�&�C�K�C�C�Crr)�
_WaitSelector�register�	selectors�
EVENT_READrr�select)r�r�selectorrs�deadliner�s      rrr�s9��	�
�_�_�	)��"�
=�
=���!�!�#�y�';�<�<�<�<��"��>�+�+�g�5��
)� ����0�0���)�C�C�U�C�C�C�	)�	)�	)�	)�	)�	)�	)�	)��*�"*�T�^�-=�-=�"=��"�Q�;�;�#(�	)�	)�	)�	)�	)�	)�	)�	)�
)�	)�	)�	)�	)����	)�	)�	)�	)�	)�	)s�A!B+�>B+�*B+�+B/�2B/c��|���}tj|tjtj��5}ddlm}|�|��}t||j	|j
ffcddd��S#1swxYwYdS)Nr)�resource_sharer)r`r4�fromfdr�SOCK_STREAMr$r��	DupSocket�rebuild_connectionrGrH)rwrFrAr��dss     r�reduce_connectionr��s���������
�]�6�6�>�6�3E�
F�
F�	J�!�)�)�)�)�)�)� �*�*�1�-�-�B�%��D�M�4�=�'I�I�	J�	J�	J�	J�	J�	J�	J�	J�	J�	J�	J�	J����	J�	J�	J�	J�	J�	Js�1A=�=B�Bc�p�|���}t|���||��Sr�r	r�)r�rGrH�socks    rr�r��s)���y�y�{�{���$�+�+�-�-��8�<�<�<rc���|jrtjnd|jrtjndz}tj|���|��}t||j|jffSr�)	rGr��FILE_GENERIC_READrH�FILE_GENERIC_WRITEr�	DupHandler`�rebuild_pipe_connection)rwr%�dhs   r�reduce_pipe_connectionr��s^��04�
�D�7�,�,�1�15��E�7�-�-�A�G��
�
 �������
7�
7��&��T�]�D�M�(J�J�Jrc�L�|���}t|||��Sr)r	r�)r�rGrHrFs    rr�r��s!���������f�h��9�9�9rc�z�tj|�����}t||j|jffSr)r�DupFdr`r�rGrH)rw�dfs  rr�r��s/��
�_�T�[�[�]�]�
+�
+��!�B��
�t�}�#E�E�Erc�L�|���}t|||��Srr�)r�rGrH�fds    rr�r��s!��
�Y�Y�[�[���"�h��1�1�1r)NN)Tr)I�__all__r�r(r1r4r�rr%�	itertoolsr�r$rr	r
�contextr�ForkingPicklerrpr�rr
rr�ImportErrorr2r�CONNECTION_TIMEOUT�countr+r��familiesr3rrr/r5r=r?r�r��objectrrrr�rr�rrerfrirjr�r�rqrr�r�r�r�r��ERROR_NETNAME_DELETEDr�rr�r�r��SelectSelectorr�r�r�r�r�r�rr�<module>r�s���3�
2�
2��	�	�	�	�	�	�	�	�
�
�
�
�
�
�
�
�
�
�
�
�����������������������1�1�1�1�1�1�1�1��������*����N�N�N�O�O�O�O�O�O�O�O�O�O�O�O�O������
�|�w���
��G�G�G����������	��!�!�
����;��
�7�6�9�����N�����H��<�7����N�����H�-�&�&�&�&� � � �0�0�0�
F�
F�
F�
F�
F�
F�&T�T�T�T�T�T�T�T�n�O�M�M�M�M�M��M�M�M�`M�M�M�M�M��M�M�M�h:�:�:�:�:�v�:�:�:�z
�
�
�
�*�<�7��������&&�&�&�&�X)�)�)�)�)�V�)�)�)�X&�&�&��<�7���6,�6,�6,�6,�6,�v�6,�6,�6,�p!�!�!�>���	�
��
��
?�
?�
?�>�>�>�$
�
�
�
�
��
�
�
�H�H�H����>�>�>�>�>�(�>�>�>�L�L�L��<�7������(�.��0M�N�M�L>�L>�L>�L>�L>�`����
�w�y�.�)�)�1�!�.�
�
�!�0�
�)�)�)�)�6�<�7���J�J�J�=�=�=��I��z�#4�5�5�5�K�K�K�
:�:�:��I��~�'=�>�>�>�>�>�F�F�F�2�2�2��I��z�#4�5�5�5�5�5s�A�A,�+A,

ZeroDay Forums Mini