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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db6be7613ca31a36241a5c4bfdc07a750845503300c643aca0fa985b7effc89a
|
|
| MD5 |
625518f61b4b5b52ab700ad048c67537
|
|
| BLAKE2b-256 |
64bfb81000707e2fa88a41ac83ec9dc9c677400319ee3d2e9db3236a46bf27fc
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa012cee9eea71e1fd7e152b1302d70731e5466f63a84b1752b9e16a02df1dff
|
|
| MD5 |
69e4e9f07f291f8d6306652b1b62228f
|
|
| BLAKE2b-256 |
11ca3da9196a439447dc8cf651297ea061c5b4cfe556e4683a10335973b59070
|