Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.217.80
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 /
compose /
cli /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2024-07-10 10:57
__init__.py
0
B
-rw-r--r--
2021-05-10 10:30
colors.py
1.25
KB
-rw-r--r--
2021-05-10 10:30
command.py
6.59
KB
-rw-r--r--
2021-05-10 10:30
docker_client.py
5.98
KB
-rw-r--r--
2021-05-10 10:30
docopt_command.py
1.79
KB
-rw-r--r--
2021-05-10 10:30
errors.py
5.06
KB
-rw-r--r--
2021-05-10 10:30
formatter.py
1.66
KB
-rw-r--r--
2021-05-10 10:30
log_printer.py
7.9
KB
-rw-r--r--
2021-05-10 10:30
main.py
61.76
KB
-rw-r--r--
2021-05-10 10:30
signals.py
873
B
-rw-r--r--
2021-05-10 10:30
utils.py
3.48
KB
-rw-r--r--
2021-05-10 10:30
verbose_proxy.py
1.62
KB
-rw-r--r--
2021-05-10 10:30
Save
Rename
import functools import logging import pprint from itertools import chain def format_call(args, kwargs): args = (repr(a) for a in args) kwargs = ("{!s}={!r}".format(*item) for item in kwargs.items()) return "({})".format(", ".join(chain(args, kwargs))) def format_return(result, max_lines): if isinstance(result, (list, tuple, set)): return "({} with {} items)".format(type(result).__name__, len(result)) if result: lines = pprint.pformat(result).split('\n') extra = '\n...' if len(lines) > max_lines else '' return '\n'.join(lines[:max_lines]) + extra return result class VerboseProxy: """Proxy all function calls to another class and log method name, arguments and return values for each call. """ def __init__(self, obj_name, obj, log_name=None, max_lines=10): self.obj_name = obj_name self.obj = obj self.max_lines = max_lines self.log = logging.getLogger(log_name or __name__) def __getattr__(self, name): attr = getattr(self.obj, name) if not callable(attr): return attr return functools.partial(self.proxy_callable, name) def proxy_callable(self, call_name, *args, **kwargs): self.log.info("%s %s <- %s", self.obj_name, call_name, format_call(args, kwargs)) result = getattr(self.obj, call_name)(*args, **kwargs) self.log.info("%s %s -> %s", self.obj_name, call_name, format_return(result, self.max_lines)) return result