403Webshell
Server IP : 167.99.254.82  /  Your IP : 216.73.217.58
Web Server : Apache
System : Linux host.techisquad.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64
User : pawluxera ( 1011)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/3440407/root/lib/python3.10/html/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/3440407/root/lib/python3.10/html/__pycache__/parser.cpython-310.pyc
o

�T�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.
    )�script�style�xmp�iframe�noembed�noframes)�textarea�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)r
r�reset)�selfr
r�r�"/usr/lib/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�rrrrr�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').
        rrrN)	r�lenrr�appendr�join�clear�goahead)r�data�nrrr�feed�s




zHTMLParser.feedcCs:|jr|jd�|j�7_|j��d|_|�d�dS)zHandle any buffered data.rrrN)rrr%r&rr'r"rrr�close�s

zHTMLParser.closeNcCs|jS)z)Return full source of start tag: '<...>'.)�_HTMLParser__starttag_textr"rrr�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/rrr�set_cdata_mode�s




�

�zHTMLParser.set_cdata_modecCst|_d|_d|_dS)NT)rrrrr"rrr�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�flagrrr�_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)(rr#r
r�find�rfind�maxr2r3�searchr�startr�handle_datar�	updatepos�
startswith�starttagopen�match�parse_starttag�parse_endtag�
parse_comment�parse_pi�parse_html_declaration�
endtagopen�handle_comment�endswithr�unknown_declr1�handle_decl�	handle_pi�AssertionError�charref�group�handle_charref�end�	entityref�handle_entityref�
incomplete)rrdr�ir)�j�ampposrTrR�k�suffix�namerrrr'�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)NrBrAz+unexpected call to parse_html_declaration()rDr?rGrEz]]>rrIrFrHrrz<![�])	rrWrrKr]r1r^r[�parse_bogus_comment)rrhrri�gtposrrrrYjs4
�
z!HTMLParser.parse_html_declarationcCsp|j}|�d|�s
Jd��t�||d�}|s#t�||d�}|s#dS|r4|��}|�||d|��|��S)Nr?�"unexpected call to parse_comment()rDrI)	rrR�commentcloserN�commentabruptcloserTrOr[rd)rrh�reportrrTrirrrrW�szHTMLParser.parse_commentrcCs`|j}|||d�dvsJd��|�d|d�}|dkrdS|r,|�||d|��|dS)NrB)rAr>rqrrIr)rrKr[)rrhrtr�posrrrro�szHTMLParser.parse_bogus_commentcCsd|j}|||d�dksJd��t�||d�}|sdS|��}|�||d|��|��}|S)NrBr@zunexpected call to parse_pi()rI)r�picloserNrOr_rd�rrhrrTrirrrrX�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()rBrF�'rI�")r�/>�
rz�noscriptr0Fr.T)r,�check_for_whole_start_tagr�tagfind_tolerantrTrdrbr1r�attrfind_tolerantrr$�strip�getpos�countr#rLrPr\�handle_startendtag�handle_starttag�CDATA_CONTENT_ELEMENTSrr7�RCDATA_CONTENT_ELEMENTS)rrh�endposr�attrsrTrk�tag�m�attrname�rest�	attrvaluerd�lineno�offsetrrrrU�sf
&(�

�
	�
��zHTMLParser.parse_starttagcCs>|j}t�||d�}|sJ�|��}||ddkrdS|S)NrrrI)r�locatetagendrTrdrwrrrr}�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)	NrBr>zunexpected call to parse_endtagrrrIrFr)rrKrZrTror�rdr~rbr1�
handle_endtagr8)rrhrrTrir�rrrrV�s&

zHTMLParser.parse_endtagcCs|�||�|�|�dS�N)r�r��rr�r�rrrr�szHTMLParser.handle_startendtagcC�dSr�rr�rrrr��zHTMLParser.handle_starttagcCr�r�r)rr�rrrr�r�zHTMLParser.handle_endtagcCr�r�r�rrmrrrrc!r�zHTMLParser.handle_charrefcCr�r�rr�rrrrf%r�zHTMLParser.handle_entityrefcCr�r�r�rr(rrrrP)r�zHTMLParser.handle_datacCr�r�rr�rrrr[-r�zHTMLParser.handle_commentcCr�r�r)r�declrrrr^1r�zHTMLParser.handle_declcCr�r�rr�rrrr_5r�zHTMLParser.handle_picCr�r�rr�rrrr]8r�zHTMLParser.unknown_decl)T)r)!�__name__�
__module__�__qualname__�__doc__r�r�rrr*r+r,r-r7r8r:r'rYrWrorXrUr}rVr�r�r�rcrfrPr[r^r_r]rrrrrZs@


"
9
)r�r2r �htmlr�__all__r3rrgrerarSrZrvrrrsr~�VERBOSErr��locatestarttagend_tolerant�	endendtag�
endtagfindr!rrrrr�<module>s6











�
��



Youez - 2016 - github.com/yon3zu
LinuXploit