- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.137.218.70
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__/meta.cpython-36.pyc
3

aG�\��@sPdZddlmZddlmZddlmZmZGdd�de�Zdd�Z	d	d
�Z
dS)a5
    jinja2.meta
    ~~~~~~~~~~~

    This module implements various functions that exposes information about
    templates that might be interesting for various kinds of applications.

    :copyright: (c) 2017 by the Jinja Team, see AUTHORS for more details.
    :license: BSD, see LICENSE for more details.
�)�nodes)�
CodeGenerator)�string_types�	iteritemsc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�TrackingCodeGeneratorz.We abuse the code generator for introspection.cCstj||dd�t�|_dS)Nz<introspection>)r�__init__�set�undeclared_identifiers)�self�environment�r�/usr/lib/python3.6/meta.pyrs
zTrackingCodeGenerator.__init__cCsdS)zDon't write.Nr)r
�xrrr
�writeszTrackingCodeGenerator.writecCsBtj||�x0t|jj�D] \}\}}|dkr|jj|�qWdS)z$Remember all undeclared identifiers.ZresolveN)r�enter_framerZsymbols�loadsr	�add)r
�frame�_�actionZparamrrr
rsz!TrackingCodeGenerator.enter_frameN)�__name__�
__module__�__qualname__�__doc__rrrrrrr
rsrcCst|j�}|j|�|jS)aReturns a set of all variables in the AST that will be looked up from
    the context at runtime.  Because at compile time it's not known which
    variables will be used depending on the path the execution takes at
    runtime, all variables are returned.

    >>> from jinja2 import Environment, meta
    >>> env = Environment()
    >>> ast = env.parse('{% set foo = 42 %}{{ bar + foo }}')
    >>> meta.find_undeclared_variables(ast) == set(['bar'])
    True

    .. admonition:: Implementation

       Internally the code generator is used for finding undeclared variables.
       This is good to know because the code generator might raise a
       :exc:`TemplateAssertionError` during compilation and as a matter of
       fact this function can currently raise that exception as well.
    )rrZvisitr	)�astZcodegenrrr
�find_undeclared_variables$s

rccs�x�|jtjtjtjtjf�D]�}t|jtj�s�t|jtj	tj
f�r~x@|jjD],}t|tj�rrt|jt
�rx|jVqLdVqLWqdVqt|jjt
�r�|jjVqt|tj�r�t|jjttf�r�x(|jjD]}t|t
�r�|Vq�WqdVqWdS)abFinds all the referenced templates from the AST.  This will return an
    iterator over all the hardcoded template extensions, inclusions and
    imports.  If dynamic inheritance or inclusion is used, `None` will be
    yielded.

    >>> from jinja2 import Environment, meta
    >>> env = Environment()
    >>> ast = env.parse('{% extends "layout.html" %}{% include helper %}')
    >>> list(meta.find_referenced_templates(ast))
    ['layout.html', None]

    This function is useful for dependency tracking.  For example if you want
    to rebuild parts of the website after a layout template has changed.
    N)Zfind_allrZExtendsZ
FromImportZImportZInclude�
isinstance�templateZConstZTupleZList�items�valuer�tuple�list)rZnodeZ
template_namerrr
�find_referenced_templates<s&

r"N)rZjinja2rZjinja2.compilerrZjinja2._compatrrrrr"rrrr
�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit