INNER CODE UNIT · Python

start_vessel_server

Marven11/EtherGhost · ether_ghost/vessel_php/main.py:33

async def start_vessel_server(
    session: PHPSessionInterface,
    server_session: t.Union[PHPSessionInterface, None] = None,
    timeout=10,
):
    code = (
        VESSEL_SERVER_SRC.read_text().removeprefix("<?php").strip().replace("    ", "")
    )
    vessel_client_store = f"_{uuid.uuid4()}"
    vessel_session_key = f"_{uuid.uuid4()}"
    logger.debug(f"Vessel session key: {vessel_session_key}")
    # 先测试一下phpsession是否可以使用
    await session.php_eval(
        f"""
@session_start();
$_SESSION['{vessel_client_store}'] = '{vessel_client_store}';
"""
    )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…