INNER CODE UNIT · Python

get_vessel_client

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

def get_vessel_client(session: PHPSessionInterface, load_vessel_client_code):

    async def vessel_client_call(fn, *args, timeout):
        start_uuid, stop_uuid = str(uuid.uuid4()), str(uuid.uuid4())
        start_uuid_1, start_uuid_2 = start_uuid[:10], start_uuid[10:]
        args_b64 = base64_encode(json.dumps(args))
        _, result = await session.php_eval_beforebody(
            (
                load_vessel_client_code
                + f"""
$args = json_decode(base64_decode({args_b64!r}), true);
$result = $client -> call("call_over_session", {fn!r}, $args, {timeout!r});
echo "{start_uuid_1}" . "{start_uuid_2}";
echo $result;
echo "{stop_uuid}";
"""
            )
        )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…