403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/site-packages/bs4/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/bs4/tests/__pycache__/test_fuzz.cpython-312.pyc
�

V	�g���4�dZddlZddlZddlZddlmZmZ	ddlmZejjd�Zejjd�Zedk7xredk7Z
ejj!e
d�	�Gd
�de��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)�SelectorSyntaxError�lxml�html5libFz/Prerequisites for fuzz tests are not installed.��reasonc�Z�eZdZdZdeddfd�Zejjdddg�d��Z	ejjdgd	��d
��Z
ejjdgd��d��Zejjdd
dg�d��Zejjd��ejjdgd��d���Zejjd��ejjddg�d���Zdedefd�Zy)�TestFuzzz	.testcase�filename�returnNc��|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-xmlr�html.parserrr��
)�featuresTzutf-8�replace)
�_TestFuzz__markup�int�len�
ValueErrorrr�list�find_all�css�select�decoder�prettify)�selfr�data�parsers�idx�css_selector�soups       �5C:\Python312\Lib\site-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�Cz: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_markupHs>�����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_css[s%�����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%�rrs  r$�test_deeply_nested_documentz$TestFuzz.test_deeply_nested_documento���	
����)r0z:clusterfuzz-testcase-minimized-bs4_fuzzer-4670634698080256z:clusterfuzz-testcase-minimized-bs4_fuzzer-5270998950477824c�&�|j|�yr2r3r4s  r$�test_soupsieve_errorszTestFuzz.test_soupsieve_errorszs��	
����)r0zhtml5lib-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�9r0z:clusterfuzz-testcase-minimized-bs4_fuzzer-6306874195312640c�&�|j|�yr2r3r4s  r$�test_html5lib_parse_errorsz#TestFuzz.test_html5lib_parse_errors�r6r0c��|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_dirrDs    r$�__markupzTestFuzz.__markup�si��� � ��!5�!5�6���,�,�,�H��7�7�=�=��*�1�-���w�w�|�|�H�f�h�7���D�$��$�$�&�&r0)�__name__�
__module__�__qualname__rB�strr%r(�mark�parametrizer,r/r5r8�skipr;r=�bytesr�r0r$rrsy��"�O��3��4��6�[�[����H�<�	
��1��1��[�[����	
��6��6��[�[����	
��*��*��[�[����H�H�	
��*��*��[�[���9��:��[�[����
	
��":�#�;�$:��[�[���9��:��[�[����
I�	
��*��;�*�'��'��'r0r)�__doc__rC�	importlibr(�bs4rr�soupsieve.utilr�util�	find_spec�has_lxml�has_html5lib�fully_fuzzable�ImportErrorrP�skipif�objectrrTr0r$�<module>ras���	�
��
��
�2��~�~�'�'��/�H��>�>�+�+�J�7�L���%�>�,�$�*>�N�
�������P���U'�v�U'��U'�����N��s�AB
�
B�B

Youez - 2016 - github.com/yon3zu
LinuXploit