OXIESEC PANEL
- Current Dir:
/
/
snap
/
core20
/
2582
/
usr
/
lib
/
python3.8
/
asyncio
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
04/29/2025 04:07:53 PM
rwxr-xr-x
📄
__init__.py
1.2 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
__main__.py
3.26 KB
03/18/2025 08:04:55 PM
rw-r--r--
📁
__pycache__
-
04/29/2025 04:07:52 PM
rwxr-xr-x
📄
base_events.py
70.92 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
base_futures.py
2.51 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
base_subprocess.py
8.64 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
base_tasks.py
2.41 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
constants.py
888 bytes
03/18/2025 08:04:55 PM
rw-r--r--
📄
coroutines.py
8.59 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
events.py
25.55 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
exceptions.py
1.59 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
format_helpers.py
2.35 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
futures.py
12.85 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
locks.py
16.87 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
log.py
124 bytes
03/18/2025 08:04:55 PM
rw-r--r--
📄
proactor_events.py
31.31 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
protocols.py
6.97 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
queues.py
8.03 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
runners.py
2.01 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
selector_events.py
38.08 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
sslproto.py
26.57 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
staggered.py
5.85 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
streams.py
26.03 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
subprocess.py
7.88 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
tasks.py
33.13 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
transports.py
10.24 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
trsock.py
5.74 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
unix_events.py
47.96 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
windows_events.py
32.1 KB
03/18/2025 08:04:55 PM
rw-r--r--
📄
windows_utils.py
4.94 KB
03/18/2025 08:04:55 PM
rw-r--r--
Editing: __main__.py
Close
import ast import asyncio import code import concurrent.futures import inspect import sys import threading import types import warnings from . import futures class AsyncIOInteractiveConsole(code.InteractiveConsole): def __init__(self, locals, loop): super().__init__(locals) self.compile.compiler.flags |= ast.PyCF_ALLOW_TOP_LEVEL_AWAIT self.loop = loop def runcode(self, code): future = concurrent.futures.Future() def callback(): global repl_future global repl_future_interrupted repl_future = None repl_future_interrupted = False func = types.FunctionType(code, self.locals) try: coro = func() except SystemExit: raise except KeyboardInterrupt as ex: repl_future_interrupted = True future.set_exception(ex) return except BaseException as ex: future.set_exception(ex) return if not inspect.iscoroutine(coro): future.set_result(coro) return try: repl_future = self.loop.create_task(coro) futures._chain_future(repl_future, future) except BaseException as exc: future.set_exception(exc) loop.call_soon_threadsafe(callback) try: return future.result() except SystemExit: raise except BaseException: if repl_future_interrupted: self.write("\nKeyboardInterrupt\n") else: self.showtraceback() class REPLThread(threading.Thread): def run(self): try: banner = ( f'asyncio REPL {sys.version} on {sys.platform}\n' f'Use "await" directly instead of "asyncio.run()".\n' f'Type "help", "copyright", "credits" or "license" ' f'for more information.\n' f'{getattr(sys, "ps1", ">>> ")}import asyncio' ) console.interact( banner=banner, exitmsg='exiting asyncio REPL...') finally: warnings.filterwarnings( 'ignore', message=r'^coroutine .* was never awaited$', category=RuntimeWarning) loop.call_soon_threadsafe(loop.stop) if __name__ == '__main__': loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) repl_locals = {'asyncio': asyncio} for key in {'__name__', '__package__', '__loader__', '__spec__', '__builtins__', '__file__'}: repl_locals[key] = locals()[key] console = AsyncIOInteractiveConsole(repl_locals, loop) repl_future = None repl_future_interrupted = False try: import readline # NoQA except ImportError: pass repl_thread = REPLThread() repl_thread.daemon = True repl_thread.start() while True: try: loop.run_forever() except KeyboardInterrupt: if repl_future and not repl_future.done(): repl_future.cancel() repl_future_interrupted = True continue else: break