CTFBridge
A unified Python interface for all major CTF platforms
Features • Quickstart • Install • Docs • License
✨ Features
- ✅ Unified API for multiple CTF platforms
- 🧠 Auto-detect platform type from just a URL
- 🔐 Clean auth flow with support for credentials and API tokens
- 🧩 Challenge enrichment — parses services and attachments from descriptions
- 🔄 Persistent sessions — save/load session state with ease
- 🤖 Async-first design — perfect for scripts, tools, and automation
🚀 Quickstart
import asyncio
from ctfbridge import create_client
async def main():
# Connect and authenticate
client = await create_client("https://demo.ctfd.io")
await client.auth.login(username="admin", password="password")
# Get challenges
challenges = await client.challenges.get_all()
for chal in challenges:
print(f"[{chal.category}] {chal.name} ({chal.value} points)")
# Submit a flag
await client.challenges.submit(challenge_id=1, flag="CTF{flag}")
# View the scoreboard
scoreboard = await client.scoreboard.get_top(5)
for entry in scoreboard:
print(f"[+] {entry.rank}. {entry.name} - {entry.score} points")
if __name__ == "__main__":
asyncio.run(main())
📦 Installation
pip install ctfbridge
🧩 Supported Platforms
CTFBridge works out of the box with:
| Platform | Login | View Challenges | Submit Flags | View Scoreboard |
|---|---|---|---|---|
| CTFd | ✅ | ✅ | ✅ | ✅ |
| rCTF | ✅ | ✅ | ✅ | ✅ |
| GZCTF | ✅ | ✅ | ✅ | ✅ |
| HTB | ✅ | ✅ | ✅ | ✅ |
| Berg | ❌ | ✅ | ❌ | ❌ |
| EPT | ✅ | ✅ | ✅ | ❌ |
| CryptoHack | ✅ | ✅ | ✅ | ❌ |
| pwn.college | ✅ | ✅ | ✅ | ❌ |
| pwnable.tw | ✅ | ✅ | ✅ | ❌ |
| pwnable.kr | ✅ | ✅ | ✅ | ❌ |
| pwnable.xyz | ✅ | ✅ | ✅ | ❌ |
| More... | 🚧 | 🚧 | 🚧 | 🚧 |
📖 See docs for details.
📚 Documentation
All guides and API references are available at: ctfbridge.readthedocs.io
🛠️ Projects Using CTFBridge
| Project | Description |
|---|---|
| ctf-dl | 🗃️ A CTF challenge bulk downloader |
| ctf-sniper | 🎯 An automated flag submission tool |
| pwnv | 🧠 A CTF workspace management tool |
Using CTFBridge in the wild? Send a PR to feature it here!
🤝 Contributing
Contributions are welcome! We appreciate any help, from bug reports and feature requests to code enhancements and documentation improvements.
Please read our Contributing Guidelines to get started.
📄 License
MIT License © 2025 bjornmorten
Metadata
Release files for ctfbridge 0.8.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ctfbridge-0.8.10.tar.gz | 124.7 kB | Without provenance | Details for ctfbridge-0.8.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ctfbridge-0.8.10-py3-none-any.whl | Python 3 | none | any | Details for ctfbridge-0.8.10-py3-none-any.whl |
Total release size: 247.7 kB
Release files / ctfbridge-0.8.10.tar.gz
| Download URL | ctfbridge-0.8.10.tar.gz |
|---|---|
| Size | 124.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7adeca2e3f4b7c0222d2b33a8cd76b5877aaee1b5464749cda6051974a04652a
|
|
BLAKE2b-256 checksum How to use checksums |
2271be5e2882081a1db18876d243de83d1604be3f2005544270025d6c9d15364
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / ctfbridge-0.8.10-py3-none-any.whl
| Download URL | ctfbridge-0.8.10-py3-none-any.whl |
|---|---|
| Size | 123.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0227cc258d6a63b37439aefa035a27016862abf2e0fb341f3901ea4e98037c1b
|
|
BLAKE2b-256 checksum How to use checksums |
d67ad741eed6c5b61d48b8251efc3c59f16a1d7a3023f2bdefe6cc6f704d677b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for ctfbridge 0.8.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.