INNER CODE UNIT · Python

api_get

Unclecheng-li/poc-lab · AI Infrastructure/CVE-2026-47101 LiteLLM/exploit/exploit.py:49

def api_get(url: str, token: str) -> requests.Response:
    return requests.get(
        url,
        headers={
            "Authorization": f"Bearer {token}",
            "Content-Type": "application/json",
        },
        timeout=30,
    )


def safe_json(resp: requests.Response) -> dict[str, Any]:
    try:
        return resp.json()
    except Exception:
        return {"raw": resp.text}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…