项目文件夹

文件
Gelei Deng 577ac294a4 feat: modernize legacy PentestGPT with native multi-LLM support (#469)
Rebuild the classic USENIX-2024 interactive PentestGPT (reasoning / generation /
parsing sessions + Pentesting Task Tree + REPL) as a standalone
`pentestgpt_legacy` package on a native per-provider LLM layer that supports the
latest 2026 models.

- llm/: BaseProvider + OpenAI-compatible / Anthropic / Gemini connectors, a
  web-verified model registry (OpenAI, Anthropic, Gemini, DeepSeek, xAI, Qwen,
  Moonshot, local Ollama), a factory, and an LLMClient bridging async providers
  to the core's synchronous send_new_message/send_message session API.
- CLI `pentestgpt-legacy`: --list-models and --smoke-test (live per-model
  round-trip matrix), plus --reasoning-model / --parsing-model / --base-url.
- Tests: 25 unit tests (mocked, no network). Live smoke test verified 22/22
  models with a configured key respond.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 02:18:08 +08:00

33 行
1.3 KiB
Bash

# PentestGPT Configuration
# Copy this file to .env if you want to customize settings
# =============================================================================
# Claude Configuration
# =============================================================================
# Claude Code manages its own API configuration.
# Configure with: claude config
# Optional: Claude model to use
# Options: claude-sonnet-4-5-20250929, claude-opus-4-20250514
LLM_MODEL=claude-sonnet-4-5-20250929
# =============================================================================
# Modernized legacy PentestGPT (pentestgpt-legacy) — provider API keys
# =============================================================================
# Set keys only for the providers you intend to use. Run `pentestgpt-legacy
# --list-models` to see which providers are configured, and `--smoke-test` to
# verify each model actually responds.
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GEMINI_API_KEY= # or GOOGLE_API_KEY
DEEPSEEK_API_KEY=
GROK_API_KEY= # xAI (or XAI_API_KEY)
QWEN_API_KEY= # Alibaba DashScope (or DASHSCOPE_API_KEY)
KIMI_API_KEY= # Moonshot (or MOONSHOT_API_KEY)
# Optional base-URL overrides (defaults are built in per provider)
# OLLAMA_BASE_URL=http://localhost:11434/v1
# OPENAI_BASE_URL=
# DEEPSEEK_BASE_URL=https://api.deepseek.com