404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.117.152.156: ~ $
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



Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 2.42 KB 0644
__init__.cpython-36.pyc File 2.42 KB 0644
_compat.cpython-36.opt-1.pyc File 3.21 KB 0644
_compat.cpython-36.pyc File 3.21 KB 0644
_identifier.cpython-36.opt-1.pyc File 1.75 KB 0644
_identifier.cpython-36.pyc File 1.75 KB 0644
asyncfilters.cpython-36.opt-1.pyc File 4.63 KB 0644
asyncfilters.cpython-36.pyc File 4.63 KB 0644
asyncsupport.cpython-36.opt-1.pyc File 7.9 KB 0644
asyncsupport.cpython-36.pyc File 7.9 KB 0644
bccache.cpython-36.opt-1.pyc File 12.37 KB 0644
bccache.cpython-36.pyc File 12.37 KB 0644
compiler.cpython-36.opt-1.pyc File 45.69 KB 0644
compiler.cpython-36.pyc File 45.75 KB 0644
constants.cpython-36.opt-1.pyc File 1.61 KB 0644
constants.cpython-36.pyc File 1.61 KB 0644
debug.cpython-36.opt-1.pyc File 9.01 KB 0644
debug.cpython-36.pyc File 9.07 KB 0644
defaults.cpython-36.opt-1.pyc File 1.37 KB 0644
defaults.cpython-36.pyc File 1.37 KB 0644
environment.cpython-36.opt-1.pyc File 41.85 KB 0644
environment.cpython-36.pyc File 42.2 KB 0644
exceptions.cpython-36.opt-1.pyc File 4.85 KB 0644
exceptions.cpython-36.pyc File 4.85 KB 0644
ext.cpython-36.opt-1.pyc File 19.53 KB 0644
ext.cpython-36.pyc File 19.58 KB 0644
filters.cpython-36.opt-1.pyc File 33.84 KB 0644
filters.cpython-36.pyc File 33.97 KB 0644
idtracking.cpython-36.opt-1.pyc File 9.62 KB 0644
idtracking.cpython-36.pyc File 9.66 KB 0644
lexer.cpython-36.opt-1.pyc File 17.96 KB 0644
lexer.cpython-36.pyc File 18.08 KB 0644
loaders.cpython-36.opt-1.pyc File 16.14 KB 0644
loaders.cpython-36.pyc File 16.14 KB 0644
meta.cpython-36.opt-1.pyc File 3.53 KB 0644
meta.cpython-36.pyc File 3.53 KB 0644
nativetypes.cpython-36.opt-1.pyc File 4.96 KB 0644
nativetypes.cpython-36.pyc File 4.96 KB 0644
nodes.cpython-36.opt-1.pyc File 35.39 KB 0644
nodes.cpython-36.pyc File 35.75 KB 0644
optimizer.cpython-36.opt-1.pyc File 1.94 KB 0644
optimizer.cpython-36.pyc File 1.94 KB 0644
parser.cpython-36.opt-1.pyc File 24.7 KB 0644
parser.cpython-36.pyc File 24.7 KB 0644
runtime.cpython-36.opt-1.pyc File 23.95 KB 0644
runtime.cpython-36.pyc File 23.98 KB 0644
sandbox.cpython-36.opt-1.pyc File 13.82 KB 0644
sandbox.cpython-36.pyc File 13.82 KB 0644
tests.cpython-36.opt-1.pyc File 4.26 KB 0644
tests.cpython-36.pyc File 4.26 KB 0644
utils.cpython-36.opt-1.pyc File 20.15 KB 0644
utils.cpython-36.pyc File 20.15 KB 0644
visitor.cpython-36.opt-1.pyc File 3.22 KB 0644
visitor.cpython-36.pyc File 3.22 KB 0644