Linux anchor 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
Apache/2.4.18 (Ubuntu)
Server IP : 10.10.100.4 & Your IP : 216.73.217.150
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
jinja2 /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2019-06-08 07:42
__init__.py
2.27
KB
-rw-r--r--
2015-07-26 19:49
_compat.py
3.04
KB
-rw-r--r--
2015-05-25 11:40
_stringdefs.py
394.82
KB
-rw-r--r--
2014-08-08 16:42
bccache.py
12.49
KB
-rw-r--r--
2014-08-08 16:42
compiler.py
62.35
KB
-rw-r--r--
2015-05-25 12:20
constants.py
1.59
KB
-rw-r--r--
2014-08-08 16:42
debug.py
11.28
KB
-rw-r--r--
2015-05-25 12:25
defaults.py
1.03
KB
-rw-r--r--
2015-05-25 11:40
environment.py
46.99
KB
-rw-r--r--
2015-05-25 11:40
exceptions.py
4.32
KB
-rw-r--r--
2014-08-08 16:42
ext.py
24.48
KB
-rw-r--r--
2014-08-08 16:42
filters.py
29.41
KB
-rw-r--r--
2015-07-26 19:43
lexer.py
27.76
KB
-rw-r--r--
2014-08-08 16:42
loaders.py
16.97
KB
-rw-r--r--
2015-07-26 19:43
meta.py
4.1
KB
-rw-r--r--
2015-05-25 11:40
nodes.py
28.31
KB
-rw-r--r--
2019-05-14 20:12
optimizer.py
2.25
KB
-rw-r--r--
2014-08-08 16:42
parser.py
34.61
KB
-rw-r--r--
2015-05-25 11:40
runtime.py
22
KB
-rw-r--r--
2015-05-25 11:40
sandbox.py
17
KB
-rw-r--r--
2019-05-14 20:12
tests.py
4.03
KB
-rw-r--r--
2015-05-25 11:40
utils.py
16.17
KB
-rw-r--r--
2015-05-25 13:38
visitor.py
3.24
KB
-rw-r--r--
2014-08-08 16:42
Save
Rename
# -*- coding: utf-8 -*- """ jinja2.optimizer ~~~~~~~~~~~~~~~~ The jinja optimizer is currently trying to constant fold a few expressions and modify the AST in place so that it should be easier to evaluate it. Because the AST does not contain all the scoping information and the compiler has to find that out, we cannot do all the optimizations we want. For example loop unrolling doesn't work because unrolled loops would have a different scoping. The solution would be a second syntax tree that has the scoping rules stored. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2 import nodes from jinja2.visitor import NodeTransformer def optimize(node, environment): """The context hint can be used to perform an static optimization based on the context given.""" optimizer = Optimizer(environment) return optimizer.visit(node) class Optimizer(NodeTransformer): def __init__(self, environment): self.environment = environment def visit_If(self, node): """Eliminate dead code.""" # do not optimize ifs that have a block inside so that it doesn't # break super(). if node.find(nodes.Block) is not None: return self.generic_visit(node) try: val = self.visit(node.test).as_const() except nodes.Impossible: return self.generic_visit(node) if val: body = node.body else: body = node.else_ result = [] for node in body: result.extend(self.visit_list(node)) return result def fold(self, node): """Do constant folding.""" node = self.generic_visit(node) try: return nodes.Const.from_untrusted(node.as_const(), lineno=node.lineno, environment=self.environment) except nodes.Impossible: return node visit_Add = visit_Sub = visit_Mul = visit_Div = visit_FloorDiv = \ visit_Pow = visit_Mod = visit_And = visit_Or = visit_Pos = visit_Neg = \ visit_Not = visit_Compare = visit_Getitem = visit_Getattr = visit_Call = \ visit_Filter = visit_Test = visit_CondExpr = fold del fold