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.0.tar.gz (8.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.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ctfbridge-0.1.0.tar.gz
  • Upload date:
  • Size: 8.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.0.tar.gz
Algorithm Hash digest
SHA256 f33bd7dea136235005ecf92165fa5dbd61b59db4dffb864533f378c103183d26
MD5 1aaacec98f2b67a36665de180d62c8d2
BLAKE2b-256 5b6c802aae5bb0dfaad14dfb8278794aacac17a1a668cc1b18a65c7a7ee50509

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ctfbridge-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00060d489a3d9709a3bbeada28300234a3da9d168858fb6ed031215a91db8363
MD5 f9cf783f7d851073f007b0c87b25a082
BLAKE2b-256 b80e819bf8a5270a88c7127dee5f0b8b85248daa73f9dd3b0828591797fe13be

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