Skip to main content

A Python library for interacting with multiple CTF platforms.

Project description

CTF Bridge

CTF Bridge is a Python library for interacting with multiple CTF platforms through a unified interface.

⚠️ This project is still in development ⚠️

Overview

CTFBridge provides a simple, unified API to interact with different Capture the Flag (CTF) competition platforms like CTFd and more.

It hides platform-specific quirks and gives you consistent access to challenges, submissions, and authentication across platforms.

Features

  • 🌟 Unified API across different CTF platforms
  • 📄 Fetch challenges, attachments, and challenge metadata
  • 🔑 Handle logins, sessions, and authentication cleanly
  • ⚡ Automatic rate-limiting and retry handling
  • 🧩 Easy to extend with new platform clients
  • 🧪 Demo client for quick testing without external servers

Installation

pip install ctfbridge

Basic Usage

from ctfbridge import CTFdClient

client = CTFdClient(base_url="https://demo.ctfd.io")
client.login(username="admin", password="password")

challenges = client.get_challenges()
for chal in challenges:
    print(f"[{chal.category}] {chal.name} - {chal.value} points")

Optional: Automatic Platform Detection

If you don't know which platform you are connecting to, you can use get_client() to auto-detect and connect automatically.

from ctfbridge import get_client

client = get_client("https://demo.ctfd.io")
client.login("admin", "password")

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

Supported Platforms

Platform Status
CTFd ✅ Supported
rCTF ✅ Supported
DemoClient (Local testing) ✅ Available

License

MIT License © 2025 bjornmorten

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctfbridge-0.1.2.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ctfbridge-0.1.2-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file ctfbridge-0.1.2.tar.gz.

File metadata

  • Download URL: ctfbridge-0.1.2.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for ctfbridge-0.1.2.tar.gz
Algorithm Hash digest
SHA256 168a7521b602b7d5e65c574d8d45895d7cb1754bfb02a5ee11347f0536ed6676
MD5 2a2d80bdf86096ff98223ad97d524927
BLAKE2b-256 77f4e7def01310b7093680bcee64d7b2a10586c4d7323ca15f456fc23c28abf1

See more details on using hashes here.

File details

Details for the file ctfbridge-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: ctfbridge-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for ctfbridge-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 02bc7e702a1a43ecd41e240af2822a04868f1f303fd661b389378dcb2799d442
MD5 49e127fc14873b421d60d984f11c887a
BLAKE2b-256 f531598e272fac27bb6eb2a2c1f481a27c9094637789e257f3ddfca00ecdb68f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page