403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.175
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/__pycache__/test_urllib2_localnet.cpython-315.opt-2.pyc
R
>lqjFcc�R�]PHs]PHs]PHs]PHs]PHs]PHs]PH s]PH$s	]PH(s
]QH,Gs]QH4Gs]QH4Gs]PHBs\O$P	Q5\O&O)\2s\O&O/\QQ2s\O&O/\QQ2sQQ	\O4O62sQ
Q\O:2sQQ
2sQQ\O4O@2s!QQ\O4O@2s"QQ\	OF2s$\OJQP	Q5QQ\	OF22s&Qs'QQ\	OF2s(Qs)\*Q6Xc\	OV2P!P!\cPsCKhh9h)�)�support)�hashlib_helper)�threading_helper)�module�certdatazkeycert.pemzkeycert2.pemc�.`�\sQs]snQsQsQsUsP!)�LoopbackHttpServerc��[OOOUUU2UOOQ2P!)g�������?)�http�server�
HTTPServer�__init__�socket�
settimeout)�self�server_address�RequestHandlerClasss&&&�/C:\Python315\\Lib\test\test_urllib2_localnet.pyr
�LoopbackHttpServer.__init__$s6�������'�'��(6�(;�	=�	
�����s�#�c�d�UOO2vqUOQ2V1!)g$@)r�acceptr)r�request�client_addresss&  r�get_request�LoopbackHttpServer.get_request-s2��#'�+�+�"4�"4�"6���
	���4� ��(�(r�)�__name__�
__module__�__qualname__�__firstlineno__r
r�__static_attributes__�__classdictcell__��
__classdict__s@rrrs����
$�
)�
)rrc�4`�\sQs]9snQsQsQsQsUsP!)�LoopbackHttpServerThreadc���[OOU2P
Um[O2UmQUm[QU2UmUOOUm
P!)FzHTTP/1.0)z	127.0.0.1r)�	threading�Threadr
�_stop_server�Event�ready�protocol_versionr�httpd�server_port�port�r�request_handlers&&rr
�!LoopbackHttpServerThread.__init__<sW�����!�!�$�'�!����_�_�&��
�+5��(�'�(8�(7�9��
��J�J�*�*��	rc�j�P	UmUO2UOO2P!)T)r*�joinr.�server_close�rs&r�stop�LoopbackHttpServerThread.stopEs%��!����	�	���
�
���!rc��UOO2UO%fUOO	2J.P!�N)r,�setr*r.�handle_requestr7s&r�run�LoopbackHttpServerThread.runMs1���
�
�����#�#�#��J�J�%�%�'�$r)r*r.r0r,)	rrrr r
r8r>r!r"r#s@rr&r&9s����+�"�(�(rr&c�X`�\sQs]TsnQsQsQsQsQsQs	Qs
QsQ	sQ
s
UsP!)�DigestAuthHandlerc�N�]Um,Um-UmQUmQUmP!)rz
Test Realm�auth)�_request_num�_nonces�_users�_realm_name�_qopr7s&rr
�DigestAuthHandler.__init__Ws'�����������'�����	rc��VmP!r;)rH)r�qops&&r�set_qop�DigestAuthHandler.set_qop^s���	rc��VmP!r;)rF)r�userss&&r�	set_users�DigestAuthHandler.set_usersas���rc��VmP!r;)rG)r�realms&&r�	set_realm�DigestAuthHandler.set_realmes�� �rc��U9O]*
tm[O[UO2O	Q22O2oUOOU2U!)��ascii)rD�hashlib�md5�str�encode�	hexdigestrE�append)r�nonces& r�_generate_nonce�!DigestAuthHandler._generate_noncehsW�����Q������C�� 1� 1�2�9�9�'�B�C�M�M�O�������E�"��rc�,�UOQ2oV]*PoUOQ2o-oSFD\oUOQ2vqgUO2oU]*Q6XcUP*Q6XcU]PoLUO2oVtU$J^	U!)� �,�=�")�find�split�strip)r�auth_str�first_space_index�parts�	auth_dict�part�name�values&&      r�_create_auth_dict�#DigestAuthHandler._create_auth_dictns���$�M�M�#�.���a�/�0�1�����s�#���	��D��*�*�S�/�K�D��:�:�<�D��Q�x�3��5��9��#3��a�������
��#�d�O���rc���-oUOU2V%Q$V5Q$VEQ$QU*o[OUOQ22O	2oQU*o[OUOQ22O	2o	VuQ$V�Q$QU*o
[OU
OQ22O	2oV�Q	*6H!)
�password�method�uriz#%(username)s:%(realm)s:%(password)srXz%(method)s:%(uri)s�HA1�HA2z3%(HA1)s:%(nonce)s:%(nc)s:%(cnonce)s:%(qop)s:%(HA2)s�response)�updaterYrZr\r])rrmrtrurv�
final_dict�HA1_strrw�HA2_strrx�response_strrys&&&&&       r�_validate_auth� DigestAuthHandler._validate_auths����
����)�$�!)�:��%�8���5��7�*�D���k�k�'�.�.��1�2�<�<�>��&��3���k�k�'�.�.��1�2�<�<�>���5���5��4�6@�A���;�;�|�2�2�7�;�<�F�F�H���Z�0�0�0rc
�(�UOQQ2UOQQ2UOQQUO8QUO8QUO	28Q02UO2UOOQ	2P
!)
�zProxy Authentication Required�Content-Type�	text/htmlzProxy-AuthenticatezDigest realm="z", qop="z	",nonce="z", sProxy Authentication Required.)�
send_response�send_headerrGrHr`�end_headers�wfile�writer1s&&r�_return_auth_challenge�(DigestAuthHandler._return_auth_challenge�s}���%�%�c�+J�K��#�#�N�K�@��#�#� ��
�
�t�y�y�$�*>�*>�*@�#B�	C�	�#�#�%����#�#�$E�F�rc��[UO2]6XcP	!QUO7cUOU2!UO	UOQ*2oUQ*UO7cUOUQ**oLUOU2!UOQ2UO7fUOU2!UOOUQ*2P
oUOUO1FD+oUOUUUOU2%fJ)P	oJ-	U%fUOU2!P	!)rzProxy-Authorization�usernamer_)�lenrF�headersr�rq�getrE�remove�path�
short_pathr�command)rr2rmrt�auth_validatedr�s&&    rr=� DigestAuthHandler.handle_request�s1���t�{�{��q� �� ��(?�(?�?��.�.��?�?��.�.��'�'�(=�>��I���$����3��;�;�	�*�(=�?���2�2�?�C�C��=�=��)�T�\�\�9��2�2�?�C�C����#�#�I�g�$6�7�"�N�)�-�-��/I�/I�J���&�&�y�'/�'6�'>�'>�'+�-�-�&*�N�K�"��2�2�?�C�C�r)rErHrGrDrF)rrrr r
rLrPrTr`rqrr�r=r!r"r#s@rrArATs7�������!���"1�$
�*�*rrAc�`�\sQs]�snQsQsQs\8Q\80s\O\OQ22OQ2sQs
QsQsQ	sQ
sQsUsP!)�BasicAuthHandler�testUser�testPass�Test�:rXc�f�[OOOU,UN3-U@P!r;)r
r�BaseHTTPRequestHandlerr
)r�args�kwargss&*,rr
�BasicAuthHandler.__init__�s$�����*�*�3�3�D�J�4�J�6�Jrc��P!r;r�r�formatr�s&&*r�log_message�BasicAuthHandler.log_message�s��rc�n�UO]�2UOQQ2UO2P!)���Content-typer�)r�r�r�r7s&r�do_HEAD�BasicAuthHandler.do_HEAD�s,�����3�������5����rc��UOQ2UOQQUO*2UOQQ2UO2P!)�zWWW-AuthenticatezBasic realm="%s"r�r�)r�r��REALMr�r7s&r�do_AUTHHEAD�BasicAuthHandler.do_AUTHHEAD�sG�����3�����+�-A�D�J�J�-N�O������5����rc��UOOQP2%f.UO2UOO	Q2P!UOOQP2QUO
*6Xc?UO
]�2UO2UOO	Q2P!UO2P!)�
AuthorizationsNo Auth header receivedzBasic sIt works)r�r�r�r�r��ENCODED_AUTHr�r�r7s&r�do_GET�BasicAuthHandler.do_GET�s����|�|�����4�4������J�J���7�8�
�\�\�
�
���%�(0�4�3D�3D�(D�E����s�#������J�J���[�)�
���rr)rrrr �USER�PASSWDr��USER_PASSWD�base64�	b64encoder\�decoder�r
r�r�r�r�r!r"r#s@rr�r��se�����D�
�F��E�!�6�*�K��#�#�K�$6�$6�w�$?�@�G�G��P�L�K�
��
��rr�c�4`�\sQs]�snQsQsQsQsUsP!)�FakeProxyHandlerc�r�Vm[OOOU,UN3-U@P!r;)�digest_auth_handlerr
rr�r
)rr�r�r�s&&*,rr
�FakeProxyHandler.__init__s,��$7� ����*�*�3�3�D�J�4�J�6�Jrc��P!r;rr�s&&*rr��FakeProxyHandler.log_messages��	
rc��[OOUOQ2vqq4qVV0mUO
O
U2%c�UO]�Q2UOQQ2UO2UOO[QUO*Q22UOOQ2P!P!)r
�OKr�r�zYou've reached %s!<BR>rXsFOur apologies, but our server is down due to a sudden zombie invasion.)
�urllib�parse�urlparser�r�r�r=r�r�r�r�r��bytes)r�scm�netlocr��params�query�fragments&      rr��FakeProxyHandler.do_GETs���7=�|�|�7L�7L��I�I�v�8�4��d�E����#�#�2�2�4�8�8����s�D�)����^�[�9������J�J���U�#;�d�i�i�#G�#*�,�
-��J�J���:�
;�
9r)r�r�)	rrrr r
r�r�r!r"r#s@rr�r��s����K�
�
;�;rr�c�b``�\sQsQsnQsQsQsQsU1QksQs	U1Qks
Q	sQ
sQs
UsU9s!)�BasicAuthTests�r�r��	Incorrectr�c�J:�[[U_2Qo[U2UmUOUO2QUOO*UmUOO2UOOO2P!)c��[U-U@!r;)r�)r�r�s*,r�#http_server_with_basic_auth_handler�ABasicAuthTests.setUp.<locals>.http_server_with_basic_auth_handler#s��#�T�4�V�4�4rzhttp://127.0.0.1:%s)�superr��setUpr&r�
addCleanup�stop_serverr0�
server_url�startr,�wait)rr��	__class__s& �rr��BasicAuthTests.setUp sp���
�n�d�)�+�	5�.�/R�S�������(�(�)�/�$�+�+�2B�2B�B���������������� rc�J�UOO2PUmP!r;�rr8r7s&rr��BasicAuthTests.stop_server+�����������rc�.:�[[U_2P!r;)r�r��tearDown)rr�s&�rr��BasicAuthTests.tearDown/s���
�n�d�,�.rc�6�[OO2oUOUOUO
UOUO2[OO[OOU22UO[OOUO
22P![OOc'SOQSO
*2P!h9h)z!Basic auth failed for the url: %s)r�r�HTTPBasicAuthHandler�add_passwordr�r�r�r��install_opener�build_opener�
assertTrue�urlopen�error�	HTTPError�fail)r�ahs& r�test_basic_auth_success�&BasicAuthTests.test_basic_auth_success2s���
�^�^�
0�
0�
2��
����
�
�D�O�O�T�Y�Y����L����%�%�f�n�n�&A�&A�"�&E�F�	M��O�O�F�N�N�2�2�4�?�?�C�D���|�|�%�%�	M��I�I�9�D�O�O�K�L�	M�s�8C�D�1#D�Dc�T�[OO2oUOUOUO
UOUO2[OO[OOU22UO[OO29^tt^2o[OOUO
2PPP2WOO2P!)%fhK,9hr;)r�rr�r�r�r�r��INCORRECT_PASSWDr�r��assertRaisesr�r�r��	exception�close)rr��cms&  r�test_basic_auth_httperror�(BasicAuthTests.test_basic_auth_httperror;s���
�^�^�
0�
0�
2��
����
�
�D�O�O�T�Y�Y��@U�@U�V����%�%�f�n�n�&A�&A�"�&E�F�
�
�
�v�|�|�5�5�
6�
6�"��N�N�"�"�4�?�?�3�7�
������7�
6�s�	*D�D'	� D'	)rr�)rrrr r�r�r�r�r�r�r�r�r�r!r"�
__classcell__�r�r$s@@rr�r�s9�����D�
�F�"���E�	!��/�M��rr�rZ)�opensslc�b``�\sQsQsnQsQsQsQsU1QksQs	Qs
Q	sQ
sQs
QsUsU9s!)
�ProxyAuthTests�Dzhttp://localhost�tester�test123�	TestRealmc�:`�[[R_2QoROU[O
O
22P[O
Q$P[O
Q$[2RmROORORO-2ROORO2U1Qko[U2RmRORO 2ROO#2ROO$O'2QROO(*o[*O,O/QU-2o[*O,O12Rm[*O,O5URO22RmP!)c��[OO2[OOU2P!r;��os�environ�clearrz��old_environs&r�restore_environ�-ProxyAuthTests.setUp.<locals>.restore_environO�$���J�J�����J�J���k�*r�NO_PROXY�no_proxyc�::�[RO,UN3-U@!r;)r�r�)r�r�rs*,�r�create_fake_proxy_handler�7ProxyAuthTests.setUp.<locals>.create_fake_proxy_handlerZs���#�D�$<�$<�N�t�N�v�N�Nrzhttp://127.0.0.1:%dr
)r�rr�r�rr	�copyrAr�rPr�r�rTr�r&rr�r�r,r�r0r�r�ProxyHandler�ProxyDigestAuthHandler�proxy_digest_handlerr��opener)rr
r�	proxy_url�handlerr�sf    �rr��ProxyAuthTests.setUpLs@���
�n�d�)�+�	+�	
���������):�;�!#��
�
�:��!#��
�
�:��#4�#6�� �� � �*�*�D�I�I�t�{�{�+C�D�� � �*�*�4�:�:�6�	O�/�/H�I�������(�(�)�������������� �)�D�K�K�,<�,<�<�	��.�.�-�-�v�	�.B�C��$*�N�N�$I�$I�$K��!��n�n�1�1��T�.�.�0��rc�J�UOO2PUmP!r;r�r7s&rr��ProxyAuthTests.stop_servergr�rc���UOOUOUOUOUO
Q*2UOOQ2UO[OO29^tt^2oUOOUO2PPP2WOO2P!)%fhK,9h)�badrC)rr�r��URLr�r�r�rLr�r�r�r�r�openr�r��rr�s& r�-test_proxy_with_bad_password_raises_httperror�<ProxyAuthTests.test_proxy_with_bad_password_raises_httperrorks����!�!�.�.�t�z�z�4�8�8�/3�y�y�$�+�+�e�:K�	M�� � �(�(��0�
�
�
�v�|�|�5�5�
6�
6�"��K�K���T�X�X�&�7�
������7�
6�s�&C%�%C5	�.C5	c�V�UOOQ2UO[OO
29^tt^2oUOOUO2PPP2WOO2P!)%fhK,9h�rC)r�rLr�r�r�r�rr"r!r�r�r#s& r�,test_proxy_with_no_password_raises_httperror�;ProxyAuthTests.test_proxy_with_no_password_raises_httperrorssg��� � �(�(��0�
�
�
�v�|�|�5�5�
6�
6�"��K�K���T�X�X�&�7�
������7�
6�s�&B�B(	�!B(	c��UOOUOUOUOUO
2UOOQ2UOOUO29^tt^2oUO2%cJPPP2P!)%fhP!9hr')rr�r�r!r�r�r�rLrr"�read�r�results& r�test_proxy_qop_auth_works�(ProxyAuthTests.test_proxy_qop_auth_worksys����!�!�.�.�t�z�z�4�8�8�/3�y�y�$�+�+�	G�� � �(�(��0�
�[�[�
�
�d�h�h�
'�
'�6��+�+�-�-�� �(�
'�
'�
'�s�B4�'B4�4C	�=C	c���UOOUOUOUOUO
2UOOQ2UOOUO2oS9^tt^2UO2%cJPPP2P!)%fhP!9h[OOcP!h9h)zauth-int)rr�r�r!r�r�r�rLrr"r+r�r��URLErrorr,s& r�0test_proxy_qop_auth_int_works_or_throws_urlerror�?ProxyAuthTests.test_proxy_qop_auth_int_works_or_throws_urlerror�s����!�!�.�.�t�z�z�4�8�8�/3�y�y�$�+�+�	G�� � �(�(��4�
	��[�[�%�%�d�h�h�/�F����k�k�m�m��$������
�|�|�$�$�	�
�		�s0�$%C�B7�*B7�7C	�C	�C.�)C.�-C.)r�rrr)rrrr r!r�r�r�r�r�r$r(r.r2r!r"r�r�s@@rrrDs<����
�C��D�
�F��E�0�6�����rrc�Z``�UU1QkQ[OO2nR!)c�T:`�\sQsQsnQs,s,s]PsQsQs	UU1Qks
QsQsUs
P!)�1GetRequestHandler.<locals>.FakeHTTPRequestHandler�z	TestHTTP/c�z�UO2oU%c"UOOU2oVPoJ)P!r;)�	send_headr�r�)r�body�dones&  rr��8GetRequestHandler.<locals>.FakeHTTPRequestHandler.do_GET�s3���>�>�#�D���z�z�'�'��-���E�{��rc���UOQ*oUOO[U22oUO	2UO
O
U2P!)zContent-Length)r��rfiler+�intr��requestsr^)r�content_length�	post_datas&  r�do_POST�9GetRequestHandler.<locals>.FakeHTTPRequestHandler.do_POST�sC��!�\�\�*:�;�N��
�
����N�(;�<�I��K�K�M��M�M� � ��+rc�:�UORmUOOUO2RO]2vqoUO
U2SFD)vqEUOVEQUO-*2J+	U%c%UOQQ2UO2U!UO2P!)rr0r�z
text/plain)
r��headers_receivedr@r^r��popr�r�r0r�)r�
response_coder�r:�headerrp�FakeHTTPRequestHandler�	responsess&     ��rr9�;GetRequestHandler.<locals>.FakeHTTPRequestHandler.send_head�s����6:�l�l�"�3��M�M� � ����+�+4�=�=��+;�(�M�D����}�-�#*���� � ��&����1C�)C�D�$+��� � ���>�� � �"������rc��P!r;r)rr�s&*rr��=GetRequestHandler.<locals>.FakeHTTPRequestHandler.log_message�s��rr)rrrr �server_versionr@rFr0r�rCr9r�r!r")r$rJrKs@��rrJr6�s3����$��������	#�	,�
	�	�	rrJ)r
rr�)rKrJsf@r�GetRequestHandlerrP�s'���#�#����!C�!C�#�L"�!rc�``�\sQsQsnU1QksQQksQsQQksQQksQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsQsUsU9s!)�TestUrlopen�c�.:�[[U_2UO[O
O2QoUOU[OO22Q[OQ$Q[OQ$P!)c��[OO2[OOU2P!r;rrs&rr
�*TestUrlopen.setUp.<locals>.restore_environ�rr�*rr)
r�rRr�r�r�r�
urlcleanuprr	r)rr
r�s& �rr��TestUrlopen.setUp�sd���
�k�4�&�(�	
������1�1�2�	+�	
���������):�;�!$��
�
�:��!$��
�
�:�rc��,o[OOV1-U@oUOUO	]�22UOUO
22UOUOQ22UOUO22UO2QOU2!SO2h9h)r��r)
r�rr��extend�	readlinesr^�readliner+r�r5)r�url�datar��l�fs&&&,  rr��TestUrlopen.urlopen�s������N�N�"�"�3�7��7��	�
�H�H�Q�[�[��%�&�
�H�H�Q�Z�Z�\�"�
�H�H�Q�V�V�D�\�"�
�H�H�Q�V�V�X��
�G�G�I��x�x��{���
�G�G�I�s�A>C�Cc�J�UOO2PUmP!r;r�r7s&rr��TestUrlopen.stop_server�r�rc�<�Ue]�,Q1,o[U2o[U2UmUOUO2UOO2UOOO2UOOoV2mU!)Ns
we don't care)	rPr&rr�r�r�r,r�r0)rrKrr0s&&  r�start_server�TestUrlopen.start_server�s�����r�#3�4�5�I�#�I�.��.�w�7�������(�(�)�������������� ��{�{�������rc���[[OQ2%fUOQ2]QHGoUe]�,Q1,o[
U2oUU1QU-U@oUOUmU!)�HTTPSHandlerzssl support required)�make_https_server�
we care a bit�
handler_class)�hasattrr�r�skipTest�test.ssl_serversrkrPr0)rrKr�rkrrs&&,   r�start_https_server�TestUrlopen.start_https_server�sg���v�~�~�~�6�6��M�M�0�1�6����r�#3�4�5�I�#�I�.��"�4�I�w�I�&�I���{�{����rc���QoQQ,P1]�,U1,oUOU2oUOQUO*2oUOVA2UOUOQQ,2P!)sWe got here...�.�http://localhost:%s/�/z/somewhere_else)�Locationz(http://localhost:%(port)s/somewhere_else�rgr�r0�assertEqualr@)r�expected_responserKrr`s&    r�test_redirection�TestUrlopen.test_redirection�s��-��
�K�L�
�
�
�"�'�(�
�	��#�#�I�.���|�|�2�W�\�\�A�B������1�����)�)�C�1B�+C�Drc��QoQo]�Q,U1,oUOU2oUOQUO*2oUOVQ2P!)shello worldsa
hello worl
1
d
0
ru)zTransfer-Encoding�chunked)rgr�r0ry)rrz�
chunked_startryrr`s&     r�test_chunked�TestUrlopen.test_chunked
s]��*��!�	��;�<�m�L�M���#�#�H�-���|�|�2�W�\�\�A�B������1rc��QoUOQ,U1,2oUOQUO*2UOQ2UOWU2UOUOQ,2P![O
Oc+oSO2oSO2Po=KuPo=hh9h)sBad bad bad...r7zhttp://localhost:%s/weeblez404 should raise URLErrorz/weeble)rgr�r0r�r�r�r1r+r�ryr@)rrzrrbr`s&    r�test_404�TestUrlopen.test_404s���-���#�#�c�2�/@�%A�$B�C��	3��L�L�5����D�E�

�I�I�1�2�����0�1�����)�)�I�;�7���|�|�$�$�	��6�6�8�D�
�G�G�I�I��	�s�"A>�>C�C� C�Cc���QoUO]�,U1,2oUOQUO*2oUOV12UOUOQ,2P!)�
pycon 2008...�http://localhost:%s/bizarre�/bizarrerx�rrzrr`s&   r�test_200�TestUrlopen.test_200'sa��,���#�#�c�2�/@�%A�$B�C���|�|�9�G�L�L�H�I������1�����)�)�J�<�8rc���QoUO]�,U1,2oUOQUO*Q2oUOV12UOUOQQ,2P!)r�r�sget=with_feelingr�rxr�s&   r�test_200_with_parameters�$TestUrlopen.test_200_with_parameters.sj��,���#�#�c�2�/@�%A�$B�C���|�|�9�G�L�L�H�0�2������1�����)�)�J�8K�+L�Mrc���UO2o[O[Q5oUO	QUO
*UQ5oUO
UQ2P!)��cafilezhttps://localhost:%s/bizarre��contextrl)rq�ssl�create_default_context�CERT_localhostr�r0ry)rrr�r`s&   r�
test_https�TestUrlopen.test_https6sN���)�)�+���,�,�N�C���|�|�:�W�\�\�I�SZ�|�[������/�0rc��`�[eUOQ2[O%fUOQ2PnU1Qko[O[O2oUOU2UO
U[Q5o[O[Q5oUOQUO*UQ5UORQ2P!)	Nzssl module requiredzSNI support required in OpenSSLc�:�UnP!r;r)�ssl_sock�server_name�initial_context�sni_names&&&�r�cb_sni�*TestUrlopen.test_https_sni.<locals>.cb_sniBs���"�Hr)r��certfiler�zhttps://localhost:%sr��	localhost)r�ro�HAS_SNI�
SSLContext�PROTOCOL_TLS_SERVER�set_servername_callbackrqr�r�r�r0ry)rr�r�rr�s&   @r�test_https_sni�TestUrlopen.test_https_sni<s�����;��M�M�/�0��{�{�{��M�M�;�<���	#��.�.��!8�!8�9���'�'��/��)�)�'�N�)�S���,�,�N�C�����+�g�l�l�:�G��L�����;�/rc�^�UO2o[OOQUO*QQ-Q5o[OOU29^tt^2PPP2UO
UOQ*Q2P!)%fhK59h)ru�Rangezbytes=20-39�r�)rgr�r�Requestr0r�ryrF�rr�reqs&  r�test_sending_headers� TestUrlopen.test_sending_headersLs���#�#�%���n�n�$�$�%;�g�l�l�%J�.5�}�-E�%�G��
�^�^�
#�
#�C�
(�
(��)�����1�1�'�:�M�J�)�
(�s�-B�B,	�%B,	c��UO2o[OOQUO*QQ-Q5o[OOU29^tt^2PPP2UO
QUOO22UOQUOO22P!)%fhKf9h)ruz
X-SoMe-hEader�foobarr�z
X-Some-Header)
rgr�rr�r0r��assertInrF�keys�assertNotInr�s&  r�test_sending_headers_camel�&TestUrlopen.test_sending_headers_camelTs����#�#�%���n�n�$�$�%;�g�l�l�%J�.=�x�-H�%�J��
�^�^�
#�
#�C�
(�
(��)��
�
�o�w�'?�'?�'D�'D�'F�G�����'�*B�*B�*G�*G�*I�J�)�
(�s�-C
�
C	�C	c�H�UO2o[OOQUO*29^tt^2oQFDoUOV#2J	UO
UO2Q2PPP2P!)%fhP!9h)�http://localhost:%szcalling 'read' failed)r+r��info�geturl)rgr�rr�r0�
assertHasAttrr�r+)rr�open_url�attrs&   r�
test_basic�TestUrlopen.test_basic]sn���#�#�%��
�^�^�
#�
#�$9�G�L�L�$H�
I�
I�X�;���"�"�8�2�<��O�O�H�M�M�O�-D�E�J�
I�
I�
I�s�
<B�B!	�B!	c��UO2o[OOQUO*2oU9^tt^2UO2oPPP2UO
W[OOQ2UOUO2Q2P!)%fhK]9h)r�zEobject returned by 'info' is not an instance of email.message.Message�plain)rgr�rr�r0r��assertIsInstance�email�message�Messagery�get_content_subtype)rrr��info_objs&   r�	test_info�TestUrlopen.test_infods����#�#�%���>�>�)�)�!�G�L�L�0�2��
�X��}�}��H�����h��
�
�(=�(=�B�	C�	
����5�5�7��A��X�s�B2�2C	�;C	c�:�UO2o[OOQUO*2oU9^tt^2UO2oPPP2UO
WQUO*2P!)%fhK59h)r�)rgr�rr�r0r�ry)rrr�r_s&   r�test_geturl�TestUrlopen.test_geturlosf���#�#�%���>�>�)�)�*?�'�,�,�*N�O��
�X��/�/�#�C������3�g�l�l�B�C��X�s�B
�
B	�B	c���QoUO]�,U1,2o[OOQUO*2oSFDoUOVA2J	P!)r�r�)rgr�rr�r0ry)rrzrr`�lines&    r�test_iteration�TestUrlopen.test_iterationwsY��,���#�#�c�2�/@�%A�$B�C���~�~�%�%�&;�g�l�l�&J�K���D����T�5�rc���QQQQQ*Q*,oQOU2oUO]�,U1,2o[OO	QUO
*2o[
U2FDBvqVUOVaU*QU8Q	[V*28Q
[U2802JD	UOW]*[U22P!)sWe
sgot
shere
s	verylong i �
rr�zFetched line number z1 doesn't match expected:
    Expected length was z, got )	r5rgr�rr�r0�	enumerateryr�)r�linesrzrr`�indexr�s&      r�test_line_iteration�TestUrlopen.test_line_iteration~s����(�I�|�d�/B�U�/J�K���H�H�U�O���#�#�c�2�/@�%A�$B�C���~�~�%�%�&;�g�l�l�&J�K��$�T�?�K�E����T��<�$�S���%6��D�	�C�
D�+�
	
������C��J�/rc��UO]�,Q1]�,Q1,2o[OO2o[OO	QUO
*2oUO
PUO2UOUQOQ22UO
QUO2UO
QUOQ22UOUQOQ22UO
QUO2UO
Q	UOQ22P!)
r�sanyr��1zus-ascii�1zContent-length�
1234567890s
1234567890�10)rgr�rr�r�r0ryr`r"r\�
get_header)rrrrs&   r�test_issue16464�TestUrlopen.test_issue16464�s���#�#�
�"�f��
�"�f��%
������,�,�.���.�.�(�(�)>����)M�N������w�|�|�,����G�S�Z�Z�
�3�4�����w�|�|�,�����g�0�0�1A�B�C����G�\�0�0��<�=��������5�����w�1�1�2B�C�Dr)rr;)rrrr r�r�r�rgrqr{r�r�r�r�r�r�r�r�r�r�r�r�r�r�r!r"r�r�s@@rrRrR�sw����%����	�E�2�
8�9�N�1�0� K�K�F�	B�D�6�
0�E�ErrRc��[O2o[O[O,UN3P!r;)r�threading_setup�unittest�addModuleCleanup�threading_cleanup)�thread_infos r�setUpModuler��s*��"�2�2�4�K����.�@�@�O�;�Or�__main__),r�rr��urllib.parser��urllib.request�http.serverr
r(r�rY�testr�test.supportrrr��ImportError�requires_working_socketr��dirname�__file__�herer5r��CERT_fakehostnamerrrr)r&rAr�r�r��TestCaser��requires_hashdigestrrPrRr�r�mainrrr�<module>r�sz��
�	���������'�)������t�,�	�w�w���x� �������d�J�
�>���G�G�L�L��z�>�B��
)����/�/�)�4(�y�/�/�(�6v�v�r&�t�{�{�9�9�&�X;�t�{�{�9�9�;�B'�X�&�&�'�T�#�#�E�4�8�J�X�&�&�J�9�J�Z("�V^E�(�#�#�^E�@P�
�z���M�M�O���c��
�C��s�F�F&�F&�%F&

Youez - 2016 - github.com/yon3zu
LinuXploit