Features • Quickstart • Install • Docs • License
- ✅ 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
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())pip install ctfbridgeCTFBridge 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.
All guides and API references are available at: ctfbridge.readthedocs.io
| 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!
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.
MIT License © 2025 bjornmorten