Anthropic OAuth CLI - Simplified Claude Code spoof demo
✓ Published0🌍 Public
JJastor11
Last edited Jun 21, 2025
Created on Dec 10, 2025
This demo shows a simplified Claude Code spoof that impersonates Anthropic's OAuth flow to harvest user authorization codes. The Python script defines an `AnthropicOAuth` class that generates PKCE challenges, constructs an authorization URL pointing to claude.ai, and exchanges returned codes for access and refresh tokens via the console.anthropic.com token endpoint. It uses the `requests` library for HTTP calls and stores credentials in a local JSON file with restricted permissions, mimicking legitimate CLI authentication behavior.
AI-generated description