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.3.tar.gz (11.9 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.3-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ctfbridge-0.1.3.tar.gz
  • Upload date:
  • Size: 11.9 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.3.tar.gz
Algorithm Hash digest
SHA256 cd93c9442bdacab0c3cf693b440b58684f9fa61a47c601c3b4fabfcf8ac5deaf
MD5 cf47b35200922e60e3f8022a643dcd12
BLAKE2b-256 36437de960932caf5296b2f3a0c666e19379dd9a0bbde5fec8f56775618023ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ctfbridge-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 16.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bf76f483667cf77b713abfbe81fc5b40f87241c93d8297cbdd0964b73a81a2a8
MD5 03730772fa561fbe8def038df9df0f15
BLAKE2b-256 8fc3235adea483ede7d66617bb588a0b021016f060d3046c02725668dc76c26e

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