Metadata-Version: 2.4
Name: secbot
Version: 1.10.1b2
Summary: Hackbot: AI-powered automated penetration testing robot
Author-email: 赵明俊 <wisewater5419@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/iammm0/hackbot
Project-URL: Documentation, https://github.com/iammm0/hackbot/docs
Project-URL: Repository, https://github.com/iammm0/hackbot
Project-URL: Issues, https://github.com/iammm0/hackbot/issues
Keywords: ai,agent,security,automation,llm,langchain
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Security
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: langchain>=0.1.0
Requires-Dist: langchain-community>=0.0.20
Requires-Dist: langchain-core>=0.1.23
Requires-Dist: langchain-experimental>=0.0.50
Requires-Dist: langchain-ollama>=0.1.0
Requires-Dist: langchain-openai>=0.2.0
Requires-Dist: aiohttp>=3.9.1
Requires-Dist: httpx>=0.26.0
Requires-Dist: typer>=0.9.0
Requires-Dist: rich>=13.7.0
Requires-Dist: pydantic>=2.5.3
Requires-Dist: pydantic-settings>=2.1.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: pyyaml>=6.0.1
Requires-Dist: numpy>=1.24.0
Requires-Dist: requests>=2.31.0
Requires-Dist: beautifulsoup4>=4.12.2
Requires-Dist: selenium>=4.17.0
Requires-Dist: playwright>=1.41.0
Requires-Dist: sqlalchemy>=2.0.25
Requires-Dist: sqlite-vec>=0.1.0; sys_platform != "win32"
Requires-Dist: sqlite-vss>=0.1.0; sys_platform != "win32"
Requires-Dist: psutil>=5.9.0
Requires-Dist: distro>=1.8.0
Requires-Dist: loguru>=0.7.2
Requires-Dist: pytest>=8.0.0
Requires-Dist: pytest-asyncio>=0.23.3
Requires-Dist: python-multipart>=0.0.6
Requires-Dist: websockets>=12.0
Requires-Dist: tiktoken>=0.5.2
Requires-Dist: keyring>=25.0.0
Requires-Dist: prompt_toolkit>=3.0.0
Requires-Dist: paramiko>=3.0.0
Requires-Dist: setuptools>=68.0
Requires-Dist: fastapi>=0.109.0
Requires-Dist: uvicorn[standard]>=0.27.0
Requires-Dist: sse-starlette>=1.8.0
Requires-Dist: langgraph>=0.2.0
Requires-Dist: ddgs>=9.0.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.3; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Provides-Extra: cli
Requires-Dist: keyring>=25.0.0; extra == "cli"
Provides-Extra: anthropic
Requires-Dist: langchain-anthropic>=0.3.0; extra == "anthropic"
Provides-Extra: google
Requires-Dist: langchain-google-genai>=2.0.0; extra == "google"
Provides-Extra: all-providers
Requires-Dist: langchain-anthropic>=0.3.0; extra == "all-providers"
Requires-Dist: langchain-google-genai>=2.0.0; extra == "all-providers"
Provides-Extra: exploit-tools
Requires-Dist: pymetasploit3>=1.0.0; extra == "exploit-tools"
Dynamic: license-file

# Secbot (Python)

[![PyPI version](https://img.shields.io/pypi/v/secbot.svg)](https://pypi.org/project/secbot/)
[![Python versions](https://img.shields.io/pypi/pyversions/secbot.svg)](https://pypi.org/project/secbot/)
[![PyPI downloads](https://img.shields.io/pypi/dm/secbot.svg)](https://pypi.org/project/secbot/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

Secbot is an AI-powered security automation CLI for authorized security testing, research, and education.

> Security notice: use this tool only in environments where you have explicit authorization. Unauthorized scanning, exploitation, and control actions may violate laws or regulations.

![Secbot main UI](https://raw.githubusercontent.com/iammm0/secbot/main-py-version/assets/secbot-main.png)

## Why This Package

- CLI-first workflow built on `Typer + Rich`, with one-shot and interactive operation.
- Optional FastAPI server mode for REST/SSE integration in automation pipelines.
- Multi-agent execution flow (`secbot-cli` and `superhackbot`) for plan, execute, and summarize loops.
- Security toolchain covering network, web, OSINT, defense scan, reporting, and system utilities.
- Multi-provider LLM backends including Ollama, DeepSeek, OpenAI-compatible APIs, and more.

## Requirements

- Python `>= 3.10`
- `pip` (or `uv`)
- Optional: Ollama for local models

## Install

### Install from PyPI (recommended)

```bash
pip install secbot
```

If you want beta/pre-release versions:

```bash
pip install --pre secbot
```

### Install with uv

```bash
uv pip install secbot
```

### Install from source

```bash
git clone https://github.com/iammm0/secbot.git
cd secbot
uv sync
uv pip install -e .
```

## Quick Start

### 1. Configure environment variables

Create a `.env` file in your working directory:

```env
# Cloud model backend (recommended)
LLM_PROVIDER=deepseek
DEEPSEEK_API_KEY=sk-your-api-key
DEEPSEEK_MODEL=deepseek-reasoner

# Optional local backend (Ollama)
# LLM_PROVIDER=ollama
# OLLAMA_BASE_URL=http://localhost:11434
# OLLAMA_MODEL=gemma3:1b
# OLLAMA_EMBEDDING_MODEL=nomic-embed-text
```

### 2. Run the CLI

```bash
# Interactive mode
secbot

# One-shot task
secbot "扫描 192.168.1.1 的开放端口"

# Q&A mode
secbot --ask "什么是 XSS 攻击？"

# Expert agent
secbot --agent superhackbot

# Switch backend/model
secbot model
```

### 3. Start API server (optional)

```bash
secbot server
```

## CLI Commands

| Command | Description |
| --- | --- |
| `secbot` | Start interactive mode |
| `secbot "<task>"` | Run a single task |
| `secbot --ask "<question>"` | Ask security questions |
| `secbot --agent superhackbot` | Use expert agent mode |
| `secbot model` | Configure provider/model/API keys |
| `secbot server` | Run FastAPI backend |
| `secbot version` | Show installed version |

## Common Environment Variables

| Variable | Purpose | Default |
| --- | --- | --- |
| `LLM_PROVIDER` | Active model provider | `deepseek` |
| `DEEPSEEK_API_KEY` | DeepSeek API key | None |
| `DEEPSEEK_MODEL` | DeepSeek model | `deepseek-reasoner` |
| `OLLAMA_BASE_URL` | Ollama endpoint | `http://localhost:11434` |
| `OLLAMA_MODEL` | Ollama generation model | `gemma3:1b` |
| `OLLAMA_EMBEDDING_MODEL` | Ollama embedding model | `nomic-embed-text` |
| `DATABASE_URL` | SQLite database URL | `sqlite:///./data/secbot.db` |
| `LOG_LEVEL` | Log level | `INFO` |

## Documentation

- [Quickstart](https://github.com/iammm0/secbot/blob/main-py-version/docs/QUICKSTART.md)
- [API Reference](https://github.com/iammm0/secbot/blob/main-py-version/docs/API.md)
- [LLM Providers](https://github.com/iammm0/secbot/blob/main-py-version/docs/LLM_PROVIDERS.md)
- [Ollama Setup](https://github.com/iammm0/secbot/blob/main-py-version/docs/OLLAMA_SETUP.md)
- [Deployment](https://github.com/iammm0/secbot/blob/main-py-version/docs/DEPLOYMENT.md)
- [Release Guide](https://github.com/iammm0/secbot/blob/main-py-version/docs/RELEASE.md)
- [Database Guide](https://github.com/iammm0/secbot/blob/main-py-version/docs/DATABASE_GUIDE.md)
- [Security Warning](https://github.com/iammm0/secbot/blob/main-py-version/docs/SECURITY_WARNING.md)

## Project Links

- Homepage: [https://github.com/iammm0/secbot](https://github.com/iammm0/secbot)
- Issue Tracker: [https://github.com/iammm0/secbot/issues](https://github.com/iammm0/secbot/issues)
- Releases: [https://github.com/iammm0/secbot/releases](https://github.com/iammm0/secbot/releases)
- PyPI: [https://pypi.org/project/secbot/](https://pypi.org/project/secbot/)

## License

This project is licensed under MIT. See [LICENSE](LICENSE) for details.
