Linux tsuru-no-tsurugi 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.0.18 & Your IP : 216.73.216.68
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 /
uvicorn /
protocols /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2024-08-30 00:22
http
[ DIR ]
drwxr-xr-x
2024-08-30 00:22
websockets
[ DIR ]
drwxr-xr-x
2024-08-30 00:22
__init__.py
0
B
-rw-r--r--
2021-08-14 02:02
utils.py
1.81
KB
-rw-r--r--
2021-08-14 02:02
Save
Rename
import asyncio import urllib.parse from typing import Optional, Tuple from asgiref.typing import WWWScope def get_remote_addr(transport: asyncio.Transport) -> Optional[Tuple[str, int]]: socket_info = transport.get_extra_info("socket") if socket_info is not None: try: info = socket_info.getpeername() return (str(info[0]), int(info[1])) if isinstance(info, tuple) else None except OSError: # This case appears to inconsistently occur with uvloop # bound to a unix domain socket. return None info = transport.get_extra_info("peername") if info is not None and isinstance(info, (list, tuple)) and len(info) == 2: return (str(info[0]), int(info[1])) return None def get_local_addr(transport: asyncio.Transport) -> Optional[Tuple[str, int]]: socket_info = transport.get_extra_info("socket") if socket_info is not None: info = socket_info.getsockname() return (str(info[0]), int(info[1])) if isinstance(info, tuple) else None info = transport.get_extra_info("sockname") if info is not None and isinstance(info, (list, tuple)) and len(info) == 2: return (str(info[0]), int(info[1])) return None def is_ssl(transport: asyncio.Transport) -> bool: return bool(transport.get_extra_info("sslcontext")) def get_client_addr(scope: WWWScope) -> str: client = scope.get("client") if not client: return "" return "%s:%d" % client def get_path_with_query_string(scope: WWWScope) -> str: path_with_query_string = urllib.parse.quote( scope.get("root_path", "") + scope["path"] ) if scope["query_string"]: path_with_query_string = "{}?{}".format( path_with_query_string, scope["query_string"].decode("ascii") ) return path_with_query_string