CasperSecurity

Current Path : /snap/certbot/5758/usr/lib/python3.12/html/__pycache__/
Upload File :
Current File : //snap/certbot/5758/usr/lib/python3.12/html/__pycache__/parser.cpython-312.pyc

�

:5jzQ���dZddlZddlZddlmZdgZejd�Zejd�Zejd�Z	ejd�Z
ejd	�Zejd
�Zejd�Z
ejd�Zejd
�Zejd�Zejdej"�Zejdej"�Zejdej"�Zejd�Zejd�ZGd�dej.�Zy)zA parser for HTML and XHTML.�N)�unescape�
HTMLParserz[&<]z
&[a-zA-Z#]z%&([a-zA-Z][-.a-zA-Z0-9]*)[^a-zA-Z0-9]z)&#(?:[0-9]+|[xX][0-9a-fA-F]+)[^0-9a-fA-F]z	<[a-zA-Z]z
</[a-zA-Z]�>z--!?>z-?>z0([a-zA-Z][^\t\n\r\f />]*)(?:[\t\n\r\f ]|/(?!>))*a{
  (
    (?<=['"\t\n\r\f /])[^\t\n\r\f />][^\t\n\r\f /=>]*  # attribute name
   )
  ([\t\n\r\f ]*=[\t\n\r\f ]*        # value indicator
    ('[^']*'                        # LITA-enclosed value
    |"[^"]*"                        # LIT-enclosed value
    |(?!['"])[^>\t\n\r\f ]*         # bare value
    )
   )?
  (?:[\t\n\r\f ]|/(?!>))*           # possibly followed by a space
a
  [a-zA-Z][^\t\n\r\f />]*           # tag name
  [\t\n\r\f /]*                     # optional whitespace before attribute name
  (?:(?<=['"\t\n\r\f /])[^\t\n\r\f />][^\t\n\r\f /=>]*  # attribute name
    (?:[\t\n\r\f ]*=[\t\n\r\f ]*    # value indicator
      (?:'[^']*'                    # LITA-enclosed value
        |"[^"]*"                    # LIT-enclosed value
        |(?!['"])[^>\t\n\r\f ]*     # bare value
       )
     )?
    [\t\n\r\f /]*                   # possibly followed by a space
   )*
   >?
aF
  <[a-zA-Z][^\t\n\r\f />\x00]*       # tag name
  (?:[\s/]*                          # optional whitespace before attribute name
    (?:(?<=['"\s/])[^\s/>][^\s/=>]*  # attribute name
      (?:\s*=+\s*                    # value indicator
        (?:'[^']*'                   # LITA-enclosed value
          |"[^"]*"                   # LIT-enclosed value
          |(?!['"])[^>\s]*           # bare value
         )
        \s*                          # possibly followed by a space
       )?(?:\s|/(?!>))*
     )*
   )?
  \s*                                # trailing whitespace
z#</\s*([a-zA-Z][-.a-zA-Z0-9:_]*)\s*>c����eZdZdZdZdZddd��fd�
Z�fd�Zd	�Zd
�Z	dZ
d�Zdd
�d�Zd�Z
d#d�Zd�Zd�Zd#d�Zd$d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �Zd!�Zd"�Z �xZ!S)%raEFind tags and other markup and call handler functions.

    Usage:
        p = HTMLParser()
        p.feed(data)
        ...
        p.close()

    Start tags are handled by calling self.handle_starttag() or
    self.handle_startendtag(); end tags by self.handle_endtag().  The
    data between tags is passed from the parser to the derived class
    by calling self.handle_data() with the data as argument (the data
    may be split up in arbitrary chunks).  If convert_charrefs is
    True the character references are converted automatically to the
    corresponding Unicode character (and self.handle_data() is no
    longer split in chunks), otherwise they are passed by calling
    self.handle_entityref() or self.handle_charref() with the string
    containing respectively the named or numeric reference as the
    argument.
    )�script�style�xmp�iframe�noembed�noframes)�textarea�titleTF)�convert_charrefs�	scriptingc�^��t�|��||_||_|j	�y)azInitialize and reset this instance.

        If convert_charrefs is true (the default), all character references
        are automatically converted to the corresponding Unicode characters.

        If *scripting* is false (the default), the content of the
        ``noscript`` element is parsed normally; if it's true,
        it's returned as is without being parsed.
        N)�super�__init__rr�reset)�selfrr�	__class__s   ��=/root/parts/certbot/install/usr/lib/python3.12/html/parser.pyrzHTMLParser.__init__vs(���	���� 0���"����
�
��c�~��d|_d|_t|_d|_d|_d|_t�|�!�y)z1Reset this instance.  Loses all unprocessed data.�z???NT)	�rawdata�lasttag�interesting_normal�interesting�
cdata_elem�_support_cdata�
_escapablerr)rrs �rrzHTMLParser.reset�s8���������-������"������
��
�rc�N�|j|z|_|jd�y)z�Feed data to the parser.

        Call this as often as you want, with as little or as much text
        as you want (may include '\n').
        rN)r�goahead�r�datas  r�feedzHTMLParser.feed�s���|�|�d�*������Q�rc�&�|jd�y)zHandle any buffered data.�N)r#�rs r�closezHTMLParser.close�s
�����Q�rNc��|jS)z)Return full source of start tag: '<...>'.)�_HTMLParser__starttag_textr)s r�get_starttag_textzHTMLParser.get_starttag_text�s���#�#�#r��	escapablec���|j�|_||_|jdk(rtjd�|_y|rT|jsHtjd|jztjtjz�|_ytjd|jztjtjz�|_y)N�	plaintextz\Zz&|</%s(?=[\t\n\r\f />])z</%s(?=[\t\n\r\f />]))	�lowerrr!�re�compilerr�
IGNORECASE�ASCII)r�elemr/s   r�set_cdata_modezHTMLParser.set_cdata_mode�s����*�*�,���#����?�?�k�)�!�z�z�%�0�D��
�t�4�4�!�z�z�*D�t���*V�*,�-�-����*@� B�D�� "�z�z�*B�T�_�_�*T�*,�-�-����*@� B�D�rc�6�t|_d|_d|_y)NT)rrrr!r)s r�clear_cdata_modezHTMLParser.clear_cdata_mode�s��-��������rc��||_y)aEnable or disable support of the CDATA sections.
        If enabled, "<[CDATA[" starts a CDATA section which ends with "]]>".
        If disabled, "<[CDATA[" starts a bogus comments which ends with ">".

        This method is not called by default. Its purpose is to be called
        in custom handle_starttag() and handle_endtag() methods, with
        value that depends on the adjusted current node.
        See https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state
        for details.
        N)r )r�flags  r�_set_support_cdatazHTMLParser._set_support_cdata�s��#��rc��|j}d}t|�}||k�r9|jrq|jse|j	d|�}|dkr�|jdt
||dz
��}|dk\r'tjd�j||�s�n�|}n?|jj||�}|r|j�}n|jr�n|}||krJ|jr*|jr|jt|||��n|j|||�|j||�}||k(r�n|j }|d|��r=t"j%||�r|j'|�}	n�|d|�r|j)|�}	nt|d|�r|j+|�}	nY|d|�r|j-|�}	n>|d	|�r|j/|�}	n#|d
z|ks|r|jd�|d
z}	n�nH|	dk�rl|s�n>t"j%||�r�nN|d|�rK|dz|k(r|jd��n*t0j%||�r�n|j3||dzd�n�|d|�rF|}dD]'}
|j5|
|d
z�s�|t|
�z}n|j3||d
z|�n�|d|�r$|j6r|j9||dzd�n~|||dzj;�dk(r|j=||dzd�nM|d	|�r|j3||dzd�n,|d|�r|j?||dzd�ntAd��|}	|j||	�}�n�|d|�r�tBj%||�}|rY|jE�dd}|jG|�|jI�}	|d|	d
z
�s|	d
z
}	|j||	�}���d||dvr,|j|||dz�|j||dz�}�n|d|�r�tJj%||�}|rW|jEd
�}|jM|�|jI�}	|d|	d
z
�s|	d
z
}	|j||	�}���tNj%||�}|rE|rB|jE�||dk(r,|jI�}	|	|kr|}	|j||d
z�}n>|d
z|kr'|jd�|j||d
z�}nnJd��||kr��9|ra||kr\|jr*|jr|jt|||��n|j|||�|j||�}||d|_y)Nr�<�&�"z[\t\n\r\f ;]�</�<!--�<?�<!r(�)z--!z--�-��	<![CDATA[��	�	<!doctypezwe should not get here!z&#����;zinteresting.search() lied)(r�lenrr�find�rfind�maxr3r4�searchr�startr!�handle_datar�	updatepos�
startswith�starttagopen�match�parse_starttag�parse_endtag�
parse_comment�parse_pi�parse_html_declaration�
endtagopen�handle_comment�endswithr �unknown_declr2�handle_decl�	handle_pi�AssertionError�charref�group�handle_charref�end�	entityref�handle_entityref�
incomplete)rrir�i�n�j�ampposrYrW�k�suffix�names            rr#zHTMLParser.goahead�s����,�,��
����L���!�e��$�$�T�_�_��L�L��a�(���q�5�%�]�]�3��A�q��t��=�F��!���J�J��7�>�>�w��O���A��(�(�/�/���;������
�A������A��1�u��(�(�T�_�_��$�$�X�g�a��l�%;�<��$�$�W�Q�q�\�2����q�!�$�A��A�v�u� �+�+�J��#�q�!��%�%�g�q�1��+�+�A�.�A���a�(��)�)�!�,�A����*��*�*�1�-�A���a�(��
�
�a�(�A���a�(��3�3�A�6�A��!�e�q�[�C��$�$�S�)��A��A���q�5���#�)�)�'�1�5��#�D�!�,��q�5�A�:� �,�,�T�2�'�-�-�g�q�9� �!�/�/���!���
�>�#�F�A�.���&8�&�F�&�/�/���!��<� !�S��[� 0�� %�&��+�+�G�A�a�C��N�;�#�K��3��8K�8K��)�)�'�!�A�#�$�-�8� ��1�Q�3��-�-�/�;�>��(�(���1����7�#�D�!�,��+�+�G�A�a�C�D�M�:�#�D�!�,����w�q��s�t�}�5�,�-F�G�G��A��N�N�1�a�(���D�!�$��
�
�g�q�1��� �;�;�=��2�.�D��'�'��-��	�	��A�%�c�1�Q�3�/���E�����q�!�,�A���g�a�b�k�)��(�(���1�Q�3��8� �N�N�1�a��c�2����C��#�!�����3��� �;�;�q�>�D��)�)�$�/��	�	��A�%�c�1�Q�3�/���E�����q�!�,�A��"�(�(��!�4����u�{�{�}�����;�!�I�I�K����6� !�A� �N�N�1�a�!�e�4����!�e�q�[��$�$�S�)����q�!�a�%�0�A��5�5�5�q�w�!�e�z�1�q�5��$�$����� � ��'�!�A�,�!7�8�� � ���1��.����q�!�$�A��q�r�{��rc��|j}|||dzdk(sJd��|||dzdk(r|j|�S|||dzdk(rC|jr7|jd|dz�}|d	kry
|j	||dz|�|dzS|||dzj�dk(r7|jd
|dz�}|d
k(ry
|j
||dz|�|dzS|||dzdk(ra|jd
|dz�}|d	kry
||dz
dk(r|j	||dz|dz
�|dzS|j||dz|�|dzS|j|�S)NrFrEz+unexpected call to parse_html_declaration()rHrCrKrIz]]>rrMrJrLrr(z<![�])	rr\r rPrbr2rcr`�parse_bogus_comment)rrmrro�gtposs     rr^z!HTMLParser.parse_html_declarationOs����,�,���q��1��~��%�	D�)C�	D�%��1�Q�q�S�>�V�#��%�%�a�(�(�
�Q�q��s�^�{�
*�t�/B�/B����U�A�a�C�(�A��1�u�����g�a��c�1�o�.��q�5�L�
�Q�q��s�^�
!�
!�
#�{�
2��L�L��a��c�*�E���{�����W�Q�q�S��/�0���7�N�
�Q�q��s�^�u�
$����S�!�A�#�&�A��1�u���q��s�|�s�"��!�!�'�!�A�#�q��s�"3�4��q�5�L��#�#�G�A�a�C��O�4��q�5�L��+�+�A�.�.rc�,�|j}|jd|�sJd��tj||dz�}|stj||dz�}|sy|r'|j
�}|j||dz|�|j�S)NrC�"unexpected call to parse_comment()rHrM)	rrW�commentcloserS�commentabruptcloserYrTr`ri)rrm�reportrrYros      rr\zHTMLParser.parse_commentqs����,�,���!�!�&�!�,�R�.R�R�,��#�#�G�Q�q�S�1���&�,�,�W�a��c�:�E�������
�A������!��Q��0��y�y�{�rc��|j}|||dzdvsJd��|jd|dz�}|dk(ry|r|j||dz|�|dzS)NrF)rErBryrrMr()rrPr`)rrmr|r�poss     rrvzHTMLParser.parse_bogus_comment�su���,�,���q��1��~��-�	C�1B�	C�-��l�l�3��!��$���"�9��������!��C� 0�1��Q�w�rc���|j}|||dzdk(sJd��tj||dz�}|sy|j�}|j	||dz|�|j�}|S)NrFrDzunexpected call to parse_pi()rM)r�picloserSrTrdri�rrmrrYros     rr]zHTMLParser.parse_pi�st���,�,���q��1��~��%�F�'F�F�%����w��!��,�����K�K�M�����w�q��s�A��'��I�I�K���rc���d|_|j|�}|dkr|S|j}||||_g}tj	||dz�}|sJd��|j�}|j
d�j�x|_}||kr�tj	||�}|sn�|j
ddd�\}	}
}|
sd}n,|dddcxk(r|ddk(sn|dddcxk(r|ddk(rnn|dd}|rt|�}|j|	j�|f�|j�}||kr��|||j�}|d	vr|j|||�|S|jd
�r|j||�|S|j!||�||j"vs|j$r|dk(s|dk(r|j'|d
��|S||j(vr|j'|d��|S)Nrr(z#unexpected call to parse_starttag()rFrJ�'rM�")r�/>r��noscriptr1Fr.T)r,�check_for_whole_start_tagr�tagfind_tolerantrYrirgr2r�attrfind_tolerantr�append�striprUra�handle_startendtag�handle_starttag�CDATA_CONTENT_ELEMENTSrr8�RCDATA_CONTENT_ELEMENTS)
rrm�endposr�attrsrYrq�tag�m�attrname�rest�	attrvalueris
             rrZzHTMLParser.parse_starttag�s�� $����/�/��2���A�:��M��,�,��&�q��0����� �&�&�w��!��4���;�;�;�u��I�I�K��"�[�[��^�1�1�3�3���s��&�j�!�'�'���3�A���()����1�a�(8�%�H�d�I�� �	��2�A��$�8�)�B�C�.�8��2�A��#�7��2�3��7�%�a��O�	��$�Y�/�	��L�L�(�.�.�*�I�6�7�����A��&�j��a���%�%�'���k�!����W�Q�v�.�/��M��<�<����#�#�C��/��
�
� � ��e�,��t�2�2�2����C�:�$5��{�"��#�#�C�5�#�9��
���4�4�4��#�#�C�4�#�8��
rc��|j}tj||dz�}|sJ�|j�}||dz
dk7ry|S)Nr(rrM)r�locatetagendrYrir�s     rr�z$HTMLParser.check_for_whole_start_tag�sK���,�,���"�"�7�A�a�C�0����u��I�I�K���1�Q�3�<�3����rc��|j}|||dzdk(sJd��|jd|dz�dkrytj||�s$||dz|dzdk(r|dzS|j	|�St
j||dz�}|sJ�|j
�}||dz
dk7rytj||dz�}|sJ�|jd�j�}|j|�|j�|S)	NrFrBzunexpected call to parse_endtagrrrMrJr()rrPr_rYrvr�rir�rgr2�
handle_endtagr:)rrmrrYror�s      rr[zHTMLParser.parse_endtag�s���,�,���q��1��~��%�H�'H�H�%��<�<��Q�q�S�!�A�%�������+��q��s�1�Q�3��3�&���s�
��/�/��2�2��"�"�7�A�a�C�0����u��I�I�K���1�Q�3�<�3���!�&�&�w��!��4����u��k�k�!�n�"�"�$�����3�������rc�J�|j||�|j|�y�N)r�r��rr�r�s   rr�zHTMLParser.handle_startendtag�s �����S�%�(����3�rc��yr��r�s   rr�zHTMLParser.handle_starttag����rc��yr�r�)rr�s  rr�zHTMLParser.handle_endtag�r�rc��yr�r��rrss  rrhzHTMLParser.handle_charref�r�rc��yr�r�r�s  rrkzHTMLParser.handle_entityrefr�rc��yr�r�r$s  rrUzHTMLParser.handle_datar�rc��yr�r�r$s  rr`zHTMLParser.handle_commentr�rc��yr�r�)r�decls  rrczHTMLParser.handle_declr�rc��yr�r�r$s  rrdzHTMLParser.handle_pir�rc��yr�r�r$s  rrbzHTMLParser.unknown_declr�r)T)r()"�__name__�
__module__�__qualname__�__doc__r�r�rrr&r*r,r-r8r:r=r#r^r\rvr]rZr�r[r�r�r�rhrkrUr`rcrdrb�
__classcell__)rs@rrrZs�����0Y��3��+/�5�
�����O�$�16�
B��
#� G#�X/�D�	�	�.�d��< �

�
�
�
�
�
�
�
�
r)r�r3�_markupbase�htmlr�__all__r4rrlrjrfrXr_r�rzr{r��VERBOSEr�r��locatestarttagend_tolerant�	endendtag�
endtagfind�
ParserBaserr�rr�<module>r�s[��"�
����.�� �R�Z�Z��'��
�R�Z�Z��
%�
��B�J�J�>�?�	�
�"�*�*�@�
A���r�z�z�+�&��
�R�Z�Z��
%�
�
�"�*�*�S�/���r�z�z�(�#���R�Z�Z��'���2�:�:�Q�R���B�J�J� ��Z�Z����r�z�z�
��Z�Z�
�� (�R�Z�Z�)��Z�Z���
�B�J�J�s�O�	�
�R�Z�Z�>�
?�
�}
��'�'�}
r
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY