Linux jobworks 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:53:05 UTC 2026 x86_64
Apache/2.4.58 (Ubuntu)
Server IP : 10.0.1.5 & Your IP : 216.73.217.53
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
2025-08-05 17:02
__init__.py
1.88
KB
-rw-r--r--
2022-04-28 17:20
_identifier.py
1.91
KB
-rw-r--r--
2022-03-24 14:16
async_utils.py
2.41
KB
-rw-r--r--
2022-03-24 14:16
bccache.py
13.73
KB
-rw-r--r--
2022-04-28 14:08
compiler.py
70.83
KB
-rw-r--r--
2025-03-10 16:56
constants.py
1.4
KB
-rw-r--r--
2022-03-11 22:53
debug.py
6.15
KB
-rw-r--r--
2022-03-24 14:16
defaults.py
1.24
KB
-rw-r--r--
2022-03-11 22:53
environment.py
59.91
KB
-rw-r--r--
2022-04-25 19:41
exceptions.py
4.95
KB
-rw-r--r--
2022-03-11 22:53
ext.py
30.76
KB
-rw-r--r--
2022-03-24 14:16
filters.py
53.34
KB
-rw-r--r--
2025-03-10 16:56
idtracking.py
10.45
KB
-rw-r--r--
2022-03-11 22:53
lexer.py
29.09
KB
-rw-r--r--
2025-03-10 16:56
loaders.py
22.66
KB
-rw-r--r--
2022-04-28 16:37
meta.py
4.29
KB
-rw-r--r--
2022-03-11 22:53
nativetypes.py
4.13
KB
-rw-r--r--
2022-03-24 14:16
nodes.py
33.81
KB
-rw-r--r--
2025-03-10 16:56
optimizer.py
1.61
KB
-rw-r--r--
2022-03-11 22:53
parser.py
38.67
KB
-rw-r--r--
2022-03-11 22:53
py.typed
0
B
-rw-r--r--
2022-03-11 22:53
runtime.py
32.69
KB
-rw-r--r--
2022-03-24 14:16
sandbox.py
14.68
KB
-rw-r--r--
2025-03-10 16:56
tests.py
5.77
KB
-rw-r--r--
2022-03-11 22:53
utils.py
23.47
KB
-rw-r--r--
2025-03-10 16:56
visitor.py
3.48
KB
-rw-r--r--
2022-04-25 19:41
Save
Rename
import typing as t from ast import literal_eval from ast import parse from itertools import chain from itertools import islice from types import GeneratorType from . import nodes from .compiler import CodeGenerator from .compiler import Frame from .compiler import has_safe_repr from .environment import Environment from .environment import Template def native_concat(values: t.Iterable[t.Any]) -> t.Optional[t.Any]: """Return a native Python type from the list of compiled nodes. If the result is a single node, its value is returned. Otherwise, the nodes are concatenated as strings. If the result can be parsed with :func:`ast.literal_eval`, the parsed value is returned. Otherwise, the string is returned. :param values: Iterable of outputs to concatenate. """ head = list(islice(values, 2)) if not head: return None if len(head) == 1: raw = head[0] if not isinstance(raw, str): return raw else: if isinstance(values, GeneratorType): values = chain(head, values) raw = "".join([str(v) for v in values]) try: return literal_eval( # In Python 3.10+ ast.literal_eval removes leading spaces/tabs # from the given string. For backwards compatibility we need to # parse the string ourselves without removing leading spaces/tabs. parse(raw, mode="eval") ) except (ValueError, SyntaxError, MemoryError): return raw class NativeCodeGenerator(CodeGenerator): """A code generator which renders Python types by not adding ``str()`` around output nodes. """ @staticmethod def _default_finalize(value: t.Any) -> t.Any: return value def _output_const_repr(self, group: t.Iterable[t.Any]) -> str: return repr("".join([str(v) for v in group])) def _output_child_to_const( self, node: nodes.Expr, frame: Frame, finalize: CodeGenerator._FinalizeInfo ) -> t.Any: const = node.as_const(frame.eval_ctx) if not has_safe_repr(const): raise nodes.Impossible() if isinstance(node, nodes.TemplateData): return const return finalize.const(const) # type: ignore def _output_child_pre( self, node: nodes.Expr, frame: Frame, finalize: CodeGenerator._FinalizeInfo ) -> None: if finalize.src is not None: self.write(finalize.src) def _output_child_post( self, node: nodes.Expr, frame: Frame, finalize: CodeGenerator._FinalizeInfo ) -> None: if finalize.src is not None: self.write(")") class NativeEnvironment(Environment): """An environment that renders templates to native Python types.""" code_generator_class = NativeCodeGenerator concat = staticmethod(native_concat) # type: ignore class NativeTemplate(Template): environment_class = NativeEnvironment def render(self, *args: t.Any, **kwargs: t.Any) -> t.Any: """Render the template to produce a native Python type. If the result is a single node, its value is returned. Otherwise, the nodes are concatenated as strings. If the result can be parsed with :func:`ast.literal_eval`, the parsed value is returned. Otherwise, the string is returned. """ ctx = self.new_context(dict(*args, **kwargs)) try: return self.environment_class.concat( # type: ignore self.root_render_func(ctx) # type: ignore ) except Exception: return self.environment.handle_exception() async def render_async(self, *args: t.Any, **kwargs: t.Any) -> t.Any: if not self.environment.is_async: raise RuntimeError( "The environment was not created with async mode enabled." ) ctx = self.new_context(dict(*args, **kwargs)) try: return self.environment_class.concat( # type: ignore [n async for n in self.root_render_func(ctx)] # type: ignore ) except Exception: return self.environment.handle_exception() NativeEnvironment.template_class = NativeTemplate