shell bypass 403

Cubjrnet7 Shell


name : ElementInclude.cpython-39.pyc
a

��ap!�@s�dZddlmZzddlmZddlmZWn*eyVddlmZddl	mZYn0dZ
e
dZe
dZe
dZ
d	ZGd
d�dej�ZGdd
�d
e�Zddd�Zddd�Zdd�Zddefdd�Zddedfdd�ZdS)a
Limited XInclude support for the ElementTree package.

While lxml.etree has full support for XInclude (see
`etree.ElementTree.xinclude()`), this module provides a simpler, pure
Python, ElementTree compatible implementation that supports a simple
form of custom URL resolvers.
�)�etree)�urljoin)�urlopenz!{http://www.w3.org/2001/XInclude}�include�fallback�*�c@seZdZdS)�FatalIncludeErrorN��__name__�
__module__�__qualname__�rr�9/usr/lib64/python3.9/site-packages/lxml/ElementInclude.pyr	Ksr	c@seZdZdS)�LimitedRecursiveIncludeErrorNr
rrrrrOsrNcCsHt|d�}|dkr"t�|���}n|��}|s2d}|�|�}|��|S)N�rb�xml�utf-8)�openr�parse�getroot�read�decode�close)�hrefr�encoding�file�datarrr�default_loader`s

rcCs\|dkrt�||���}n>d|vr,t|�}n
t|d�}|��}|��|sNd}|�|�}|S)Nrz://rr)rrrrrrrr)rrr�parserr�frrr�_lxml_default_loaderqs


r!csd�fdd�	}|S)Ncs�|||�S)Nr)rrrr��loaderrr�load�sz_wrap_et_loader.<locals>.load)NNr)r#r$rr"r�_wrap_et_loader�sr%cCs�|durd}n|dkr"td|��|dur^t|d�rB|}|��}n|��}t|d�rp|jj}nt|d�rp|��}t||||�dS)N���rz;expected non-negative depth or None for 'max_depth', got %rr�docinfo)�
ValueError�hasattrr�getroottreer'ZURL�_include)�elemr#�base_url�	max_depthZtreerrrr�s




cCs|durt|�}nt}|dur$t�}|��j}t|�t��}|D�]�}|jt	k�r�t
||�d��}	|�dd�}
|��}|
dk�r"|	|vr�t
d|	��|dkr�td|	��||	|
|d�}|dur�t
d|	|
f��t|||	|d	|	h|B�}|j�r|jp�d
|j|_|du�r|S|�||�n�|
dk�r�||	|
|�d�d
�}
|
du�rZt
d|	|
f��|��}|du�r�|j�pvd
|
|_n0|du�r�|
S|j�p�d
|
|j�p�d
|_|�|�nt
d|
��q@|jtk�r|��}|du�r|jt	k�rt
d|j��q@t
d|j��q@|S)Nrrrz recursive include of %r detectedrz5maximum xinclude depth reached when including file %s)rzcannot load %r as %r���textr)rz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r)z0Invalid element found in XInclude namespace (%r))r%r!�setr*r�list�iter�XINCLUDE_ITER_TAG�tag�XINCLUDE_INCLUDEr�getZ	getparentr	rr+�tail�replaceZgetpreviousr1�remove�XINCLUDE_FALLBACK)r,r#r-r.Z
_parent_hrefsZload_includerZinclude_elements�err�parentZnoder1Zpredecessorrrrr+�sx

�

��
�



�

���r+)N)NN)�__doc__Zlxmlr�urlparserZurllib2r�ImportError�urllib.parseZurllib.requestZXINCLUDEr7r<r5ZDEFAULT_MAX_INCLUSION_DEPTHZLxmlSyntaxErrorr	rrr!r%rr+rrrr�<module>,s.	

�
�

© 2025 Cubjrnet7