AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /snap/core20/2582/usr/lib/python3/dist-packages/jinja2/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /snap/core20/2582/usr/lib/python3/dist-packages/jinja2/__pycache__/debug.cpython-38.pyc
U

aG�\
/�@sDdZddlZddlZddlmZmZddlmZmZddl	m
Z
ddlmZm
Z
mZzddlmZWnek
r|dZYnXzed�Wn.ek
r�d	ZYnek
r�d
ZYnXGdd�de�Zd
d�ZGdd�de�Zddd�Zddd�Zddd�Zdd�Zdd�Zdd�ZdZ edk�r@z
e�Z WnYnX[dS) aQ
    jinja2.debug
    ~~~~~~~~~~~~

    Implements the debug interface for Jinja.  This module does some pretty
    ugly stuff with the Python traceback system in order to achieve tracebacks
    with correct line numbers, locals and contents.

    :copyright: (c) 2017 by the Jinja Team.
    :license: BSD, see LICENSE for more details.
�N)�
TracebackType�CodeType)�missing�
internal_code)�TemplateSyntaxError)�	iteritems�reraise�PY2)�tproxyzraise TypeError, 'foo'zraise __jinja_exception__[1]z4raise __jinja_exception__[0], __jinja_exception__[1]c@s@eZdZdZdd�Zedd��Zdd�Zedd	��Zd
d�Z	dS)
�TracebackFrameProxyzProxies a traceback frame.cCs||_d|_dS�N)�tb�_tb_next��selfr
�r�./usr/lib/python3/dist-packages/jinja2/debug.py�__init__'szTracebackFrameProxy.__init__cCs|jSr)r�rrrr�tb_next+szTracebackFrameProxy.tb_nextcCsBtdk	r8zt|j|r|jpd�Wntk
r6YnX||_dSr)�tb_set_nextr
�	Exceptionr)r�nextrrr�set_next/szTracebackFrameProxy.set_nextcCsd|jjjkS)N�__jinja_template__)r
�tb_frame�	f_globalsrrrr�is_jinja_frame:sz"TracebackFrameProxy.is_jinja_framecCst|j|�Sr)�getattrr
)r�namerrr�__getattr__>szTracebackFrameProxy.__getattr__N)
�__name__�
__module__�__qualname__�__doc__r�propertyrrrr rrrrr$s

rcs*t|��tdkr�S�fdd�}tt|�S)Ncs@|dkrt�|d�S|dkr,�j||�nt�|�||�SdS)N)�__getattribute__r r�__setattr__)rr')Z	operation�args�kwargs��proxyrr�operation_handlerFs
z+make_frame_proxy.<locals>.operation_handler)rr
r)�framer,rr*r�make_frame_proxyBs
r.c@sPeZdZdZdd�Zddd�Zddd	�Zed
d��Zedd
��Z	edd��Z
dS)�ProcessedTracebackz?Holds a Jinja preprocessed traceback for printing or reraising.cCsR|std��||_||_||_d}|jD]}|dk	r>|�|�|}q(|�d�dS)Nzno frames for this traceback?)�AssertionError�exc_type�	exc_value�framesr)rr1r2r3Zprev_tbr
rrrrSs

zProcessedTraceback.__init__NcCs*tj|j|j|jd|d�}d�|���S)z#Return a string with the traceback.r)�limit�)�	traceback�format_exceptionr1r2r3�join�rstrip)rr4�linesrrr�render_as_textas
�z!ProcessedTraceback.render_as_textFcCs,ddlm}d|||d�|���dd�fS)z<Return a unicode string with the traceback as rendered HTML.r)�render_tracebackz%s

<!--
%s
-->)�fullzutf-8�replace)Zjinja2.debugrendererr<r;�decode)rr=r<rrr�render_as_htmlgs

�z!ProcessedTraceback.render_as_htmlcCst|jt�S)z*`True` if this is a template syntax error.)�
isinstancer2rrrrr�is_template_syntax_errorosz+ProcessedTraceback.is_template_syntax_errorcCs|j|j|jdfS)z;Exception info tuple with a proxy around the frame objects.r)r1r2r3rrrr�exc_infotszProcessedTraceback.exc_infocCs*|jd}t|�tk	r|j}|j|j|fS)z'Standard python exc_info for re-raisingr)r3�typerr
r1r2rrrr�standard_exc_infoys
z$ProcessedTraceback.standard_exc_info)N)F)r!r"r#r$rr;r@r%rBrCrErrrrr/Ps



r/cCs2|\}}}t|t�r$t||�}d}nd}t||�S)z7Creates a processed traceback object from the exc_info.r�)rAr�translate_syntax_error�translate_exception)rCZsource_hintr1r2r
�initial_skiprrr�make_traceback�s


rJcCs8||_d|_|j|df}|j}|dkr*d}t|||j�S)z4Rewrites a syntax error to please traceback systems.TNz	<unknown>)�sourceZ
translated�	__class__�filename�
fake_exc_info�lineno)�errorrKrCrMrrrrG�srGc	Cs�|d}g}t|�D]}|dk	r|j}q|}|dk	r�|jjtkrH|j}q,|j}|jj�d�}|dk	r�|�|j�}t	|dd�|f|j
|�d}|�t|��|}q,|s�t
|d|d|d�t|d|d|�S)z�If passed an exc_info it will automatically rewrite the exceptions
    all the way down to the correct line numbers and frames.
    �NrrrF)�rangerr�f_coderr�getZget_corresponding_lineno�	tb_linenorNrM�appendr.rr/)	rCrIr
r3�xZ
initial_tbr�templaterOrrrrH�s0��rHc		Cs�|�d�}|r|����}ni}i}t|�D]x\}}|�d�r,|tkrHq,z|�dd�\}}}t|�}Wntk
r~Yq,YnX|�|d�d}||kr,||f||<q,t|�D]*\}\}}|tkr�|�	|d�q�|||<q�|S)N�contextZl_�_rQ)���r)
rTZget_all�copyr�
startswithr�split�int�
ValueError�pop)	Zreal_localsZctx�localsZlocal_overridesr�valuerZZdepthZ	cur_depthrrr�get_jinja_locals�s*


rdc
Cs�|\}}}|dk	r,t|jj�}|�dd�ni}|||dd�dd�}td|dt|d�}z�|dkrnd}	n8|jjj}
|
d	kr�d
}	n |
�d�r�d|
d
d�}	nd}	t	r�t
d|j|j|j
|j|j|j|j||	|j|jdd�}n8t
d|j|j|j|j
|j|j|j|j||	|j|jdd�}Wn$tk
�r>}zW5d}~XYnXzt|||�Wnt��}|dj}YnX|dd�|fS)z!Helper for `translate_exception`.N�__jinja_exception__rQ)r!�__file__rer�
rF�execrX�rootztop-level template codeZblock_z
block "%s"�rr)rdr�f_localsra�compile�raise_helperrS�co_namer]r	r�
co_nlocals�co_stacksize�co_flags�co_code�	co_consts�co_names�co_varnames�co_firstlineno�	co_lnotab�co_kwonlyargcountrrh�sysrCr)
rCrMrOr1r2r
rb�globals�code�locationZfunction�eZnew_tbrrrrN�sr

�

��rNcsddl�ddlm�tr4t�jd�r,�j}q:�j}n�j}Gdd�d�j	�}d|fd��
|�fg|_ttd	�r�Gd
d�d�j	�}d��
|�fd��
|�fd|fd��
|�fg|_Gd
d�d|��d��
��fd��
|�fd�jfd�jfg�_���fdd�}|S)z�This function implements a few ugly things so that we can patch the
    traceback objects.  The function returned allows resetting `tb_next` on
    any python traceback object.  Do not attempt to use this on non cpython
    interpreters
    rN)rZPy_InitModule4_64c@seZdZdS�z"_init_ugly_crap.<locals>._PyObjectN�r!r"r#rrrr�	_PyObject>sr��	ob_refcnt�ob_typeZ
getobjectsc@seZdZdSr~rrrrrr�GsZ_ob_nextZ_ob_prevc@seZdZdS)z#_init_ugly_crap.<locals>._TracebackNrrrrr�
_TracebackPsr�rr�tb_lastirUcs�t|��r|dks$t|��s$td����t|��}|jdk	rZ��t|j��}|jd8_|dkrr�����|_n(��t|��}|jd7_��|�|_dS)z0Set the tb_next attribute of a traceback object.Nz/tb_set_next arguments must be traceback objectsrF)rA�	TypeErrorZfrom_address�idrr��POINTERZpointer)r
r�obj�old�rr��ctypesrrrYs
��
z$_init_ugly_crap.<locals>.tb_set_next)
r��typesrr	�hasattrZ	pythonapiZc_int64Zc_intZ	c_ssize_tZ	Structurer�Z_fields_ry)Z_Py_ssize_tr�rrr�r�_init_ugly_crap*s4�
��r�)N)N)r)!r$ryr6r�rrZjinja2.utilsrrZjinja2.exceptionsrZjinja2._compatrrr	Z__pypy__r
�ImportErrorrh�SyntaxErrorrmr��objectrr.r/rJrGrHrdrNr�rrrrr�<module>s@

4


,FD



Anon7 - 2022
AnonSec Team