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
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.1.tar.gz (9.0 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.1-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ctfbridge-0.1.1.tar.gz
  • Upload date:
  • Size: 9.0 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.1.tar.gz
Algorithm Hash digest
SHA256 db6be7613ca31a36241a5c4bfdc07a750845503300c643aca0fa985b7effc89a
MD5 625518f61b4b5b52ab700ad048c67537
BLAKE2b-256 64bfb81000707e2fa88a41ac83ec9dc9c677400319ee3d2e9db3236a46bf27fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ctfbridge-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa012cee9eea71e1fd7e152b1302d70731e5466f63a84b1752b9e16a02df1dff
MD5 69e4e9f07f291f8d6306652b1b62228f
BLAKE2b-256 11ca3da9196a439447dc8cf651297ea061c5b4cfe556e4683a10335973b59070

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