ctfbridge


Namectfbridge JSON
Version 0.8.9 PyPI version JSON
download
home_pageNone
SummaryA Python library for interacting with multiple CTF platforms.
upload_time2025-11-07 21:13:29
maintainerNone
docs_urlNone
authorNone
requires_python<3.13,>=3.10
licenseMIT
keywords ctf
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">
  CTFBridge
</h1>

<h4 align="center">A unified Python interface for all major CTF platforms </h4>

<p align="center">
  <a href="https://pypi.org/project/ctfbridge/"><img src="https://img.shields.io/pypi/v/ctfbridge" alt="PyPI"></a>
  <a href="https://pypi.org/project/ctfbridge/"><img src="https://img.shields.io/pypi/pyversions/ctfbridge" alt="Python Versions"></a>
  <a href="https://ctfbridge.readthedocs.io"><img src="https://img.shields.io/badge/docs-readthedocs-blue.svg" alt="Docs"></a>
  <a href="https://github.com/bjornmorten/ctfbridge/actions/workflows/ci.yml"><img src="https://github.com/bjornmorten/ctfbridge/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
  <img src="https://img.shields.io/github/license/bjornmorten/ctfbridge" alt="License">
</p>

<p align="center">
  <a href="#-features">Features</a> •
  <a href="#-quickstart">Quickstart</a> •
  <a href="#-installation">Install</a> •
  <a href="#-documentation">Docs</a> •
  <a href="#-license">License</a>
</p>

---

## ✨ Features

- ✅ **Unified API** for multiple CTF platforms
- 🧠 **Auto-detect platform type** from just a URL
- 🔐 **Clean auth flow** with support for credentials and API tokens
- 🧩 **Challenge enrichment** — parses services and attachments from descriptions
- 🔄 **Persistent sessions** — save/load session state with ease
- 🤖 **Async-first design** — perfect for scripts, tools, and automation

## 🚀 Quickstart

<!-- QUICKSTART_START -->
```python
import asyncio

from ctfbridge import create_client


async def main():
    # Connect and authenticate
    client = await create_client("https://demo.ctfd.io")
    await client.auth.login(username="admin", password="password")

    # Get challenges
    challenges = await client.challenges.get_all()
    for chal in challenges:
        print(f"[{chal.category}] {chal.name} ({chal.value} points)")

    # Submit a flag
    await client.challenges.submit(challenge_id=1, flag="CTF{flag}")

    # View the scoreboard
    scoreboard = await client.scoreboard.get_top(5)
    for entry in scoreboard:
        print(f"[+] {entry.rank}. {entry.name} - {entry.score} points")


if __name__ == "__main__":
    asyncio.run(main())
```
<!-- QUICKSTART_END -->

## 📦 Installation

```bash
pip install ctfbridge
```

## 🧩 Supported Platforms

CTFBridge works out of the box with:

<!-- PLATFORMS_TABLE_START -->
| Platform | Login | View Challenges | Submit Flags | View Scoreboard |
| :--- | :---: | :---: | :---: | :---: |
| **CTFd** | ✅ | ✅ | ✅ | ✅ |
| **rCTF** | ✅ | ✅ | ✅ | ✅ |
| **GZCTF** | ✅ | ✅ | ✅ | ✅ |
| **HTB** | ✅ | ✅ | ✅ | ✅ |
| **Berg** | ❌ | ✅ | ❌ | ❌ |
| **EPT** | ✅ | ✅ | ✅ | ❌ |
| **CryptoHack** | ✅ | ✅ | ✅ | ❌ |
| **pwn.college** | ✅ | ✅ | ✅ | ❌ |
| **pwnable.tw** | ✅ | ✅ | ✅ | ❌ |
| **pwnable.kr** | ✅ | ✅ | ✅ | ❌ |
| **pwnable.xyz** | ✅ | ✅ | ✅ | ❌ |
|_More..._|🚧|🚧|🚧|🚧|
<!-- PLATFORMS_TABLE_END -->

📖 See [docs](https://ctfbridge.readthedocs.io/latest/getting-started/platforms/) for details.

## 📚 Documentation

All guides and API references are available at: **[ctfbridge.readthedocs.io](https://ctfbridge.readthedocs.io/)**

## 🛠️ Projects Using CTFBridge

| Project | Description |
|---------|-------------|
| [**ctf-dl**](https://github.com/bjornmorten/ctf-dl) | 🗃️ A CTF challenge bulk downloader |
| [**ctf-sniper**](https://github.com/bjornmorten/ctf-sniper) | 🎯 An automated flag submission tool |
| [**pwnv**](https://github.com/CarixoHD/pwnv) | 🧠 A CTF workspace management tool |

Using CTFBridge in the wild? [Send a PR](https://github.com/bjornmorten/ctfbridge/edit/main/README.md) to feature it here!

## 🤝 Contributing

Contributions are welcome! We appreciate any help, from bug reports and feature requests to code enhancements and documentation improvements.

Please read our [Contributing Guidelines](CONTRIBUTING.md) to get started.

## 📄 License

MIT License © 2025 [bjornmorten](https://github.com/bjornmorten)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ctfbridge",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.10",
    "maintainer_email": null,
    "keywords": "ctf",
    "author": null,
    "author_email": "bjornmorten <bjornmdev@proton.me>",
    "download_url": "https://files.pythonhosted.org/packages/ca/60/6acbe14b0b8c5e20ab5b6eec9df9dc82f545928c3023a507af467b18a974/ctfbridge-0.8.9.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">\n  CTFBridge\n</h1>\n\n<h4 align=\"center\">A unified Python interface for all major CTF platforms </h4>\n\n<p align=\"center\">\n  <a href=\"https://pypi.org/project/ctfbridge/\"><img src=\"https://img.shields.io/pypi/v/ctfbridge\" alt=\"PyPI\"></a>\n  <a href=\"https://pypi.org/project/ctfbridge/\"><img src=\"https://img.shields.io/pypi/pyversions/ctfbridge\" alt=\"Python Versions\"></a>\n  <a href=\"https://ctfbridge.readthedocs.io\"><img src=\"https://img.shields.io/badge/docs-readthedocs-blue.svg\" alt=\"Docs\"></a>\n  <a href=\"https://github.com/bjornmorten/ctfbridge/actions/workflows/ci.yml\"><img src=\"https://github.com/bjornmorten/ctfbridge/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"></a>\n  <img src=\"https://img.shields.io/github/license/bjornmorten/ctfbridge\" alt=\"License\">\n</p>\n\n<p align=\"center\">\n  <a href=\"#-features\">Features</a> \u2022\n  <a href=\"#-quickstart\">Quickstart</a> \u2022\n  <a href=\"#-installation\">Install</a> \u2022\n  <a href=\"#-documentation\">Docs</a> \u2022\n  <a href=\"#-license\">License</a>\n</p>\n\n---\n\n## \u2728 Features\n\n- \u2705 **Unified API** for multiple CTF platforms\n- \ud83e\udde0 **Auto-detect platform type** from just a URL\n- \ud83d\udd10 **Clean auth flow** with support for credentials and API tokens\n- \ud83e\udde9 **Challenge enrichment** \u2014 parses services and attachments from descriptions\n- \ud83d\udd04 **Persistent sessions** \u2014 save/load session state with ease\n- \ud83e\udd16 **Async-first design** \u2014 perfect for scripts, tools, and automation\n\n## \ud83d\ude80 Quickstart\n\n<!-- QUICKSTART_START -->\n```python\nimport asyncio\n\nfrom ctfbridge import create_client\n\n\nasync def main():\n    # Connect and authenticate\n    client = await create_client(\"https://demo.ctfd.io\")\n    await client.auth.login(username=\"admin\", password=\"password\")\n\n    # Get challenges\n    challenges = await client.challenges.get_all()\n    for chal in challenges:\n        print(f\"[{chal.category}] {chal.name} ({chal.value} points)\")\n\n    # Submit a flag\n    await client.challenges.submit(challenge_id=1, flag=\"CTF{flag}\")\n\n    # View the scoreboard\n    scoreboard = await client.scoreboard.get_top(5)\n    for entry in scoreboard:\n        print(f\"[+] {entry.rank}. {entry.name} - {entry.score} points\")\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n<!-- QUICKSTART_END -->\n\n## \ud83d\udce6 Installation\n\n```bash\npip install ctfbridge\n```\n\n## \ud83e\udde9 Supported Platforms\n\nCTFBridge works out of the box with:\n\n<!-- PLATFORMS_TABLE_START -->\n| Platform | Login | View Challenges | Submit Flags | View Scoreboard |\n| :--- | :---: | :---: | :---: | :---: |\n| **CTFd** | \u2705 | \u2705 | \u2705 | \u2705 |\n| **rCTF** | \u2705 | \u2705 | \u2705 | \u2705 |\n| **GZCTF** | \u2705 | \u2705 | \u2705 | \u2705 |\n| **HTB** | \u2705 | \u2705 | \u2705 | \u2705 |\n| **Berg** | \u274c | \u2705 | \u274c | \u274c |\n| **EPT** | \u2705 | \u2705 | \u2705 | \u274c |\n| **CryptoHack** | \u2705 | \u2705 | \u2705 | \u274c |\n| **pwn.college** | \u2705 | \u2705 | \u2705 | \u274c |\n| **pwnable.tw** | \u2705 | \u2705 | \u2705 | \u274c |\n| **pwnable.kr** | \u2705 | \u2705 | \u2705 | \u274c |\n| **pwnable.xyz** | \u2705 | \u2705 | \u2705 | \u274c |\n|_More..._|\ud83d\udea7|\ud83d\udea7|\ud83d\udea7|\ud83d\udea7|\n<!-- PLATFORMS_TABLE_END -->\n\n\ud83d\udcd6 See [docs](https://ctfbridge.readthedocs.io/latest/getting-started/platforms/) for details.\n\n## \ud83d\udcda Documentation\n\nAll guides and API references are available at: **[ctfbridge.readthedocs.io](https://ctfbridge.readthedocs.io/)**\n\n## \ud83d\udee0\ufe0f Projects Using CTFBridge\n\n| Project | Description |\n|---------|-------------|\n| [**ctf-dl**](https://github.com/bjornmorten/ctf-dl) | \ud83d\uddc3\ufe0f A CTF challenge bulk downloader |\n| [**ctf-sniper**](https://github.com/bjornmorten/ctf-sniper) | \ud83c\udfaf An automated flag submission tool |\n| [**pwnv**](https://github.com/CarixoHD/pwnv) | \ud83e\udde0 A CTF workspace management tool |\n\nUsing CTFBridge in the wild? [Send a PR](https://github.com/bjornmorten/ctfbridge/edit/main/README.md) to feature it here!\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! We appreciate any help, from bug reports and feature requests to code enhancements and documentation improvements.\n\nPlease read our [Contributing Guidelines](CONTRIBUTING.md) to get started.\n\n## \ud83d\udcc4 License\n\nMIT License \u00a9 2025 [bjornmorten](https://github.com/bjornmorten)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python library for interacting with multiple CTF platforms.",
    "version": "0.8.9",
    "project_urls": {
        "Documentation": "https://ctfbridge.readthedocs.io",
        "Issues": "https://github.com/bjornmorten/ctfbridge/issues",
        "Repository": "https://github.com/bjornmorten/ctfbridge/"
    },
    "split_keywords": [
        "ctf"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f79f6f3af305ce96e91c9df932a81e1cdde5d25156255ec0dd46b8bd2f5e7529",
                "md5": "8c8b5aa070f5c3ec167bd99cf3a5c2d4",
                "sha256": "5c73df90dd2ac633476b5586b03b3b961bb5617adc8c0fcf69213b2cdf2eacf1"
            },
            "downloads": -1,
            "filename": "ctfbridge-0.8.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8c8b5aa070f5c3ec167bd99cf3a5c2d4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.10",
            "size": 122993,
            "upload_time": "2025-11-07T21:13:28",
            "upload_time_iso_8601": "2025-11-07T21:13:28.166205Z",
            "url": "https://files.pythonhosted.org/packages/f7/9f/6f3af305ce96e91c9df932a81e1cdde5d25156255ec0dd46b8bd2f5e7529/ctfbridge-0.8.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ca606acbe14b0b8c5e20ab5b6eec9df9dc82f545928c3023a507af467b18a974",
                "md5": "7f4adf49cd07ec5e68d07af0cc5773e2",
                "sha256": "9b36c065cf8c35e8dd472c9a1a6785c2d99234834916d25f4c5920390f32ee2f"
            },
            "downloads": -1,
            "filename": "ctfbridge-0.8.9.tar.gz",
            "has_sig": false,
            "md5_digest": "7f4adf49cd07ec5e68d07af0cc5773e2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.10",
            "size": 124668,
            "upload_time": "2025-11-07T21:13:29",
            "upload_time_iso_8601": "2025-11-07T21:13:29.483680Z",
            "url": "https://files.pythonhosted.org/packages/ca/60/6acbe14b0b8c5e20ab5b6eec9df9dc82f545928c3023a507af467b18a974/ctfbridge-0.8.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-11-07 21:13:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bjornmorten",
    "github_project": "ctfbridge",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ctfbridge"
}
        
Elapsed time: 1.09812s