__ __ _ _____ ___________
\ \ / / | | / __ \_ _| ___|
\ V /__ _ ___| |__ ___| / \/ | | | |_
\ // _` / __| '_ \|_ / | | | | _|
| | (_| \__ \ | | |/ /| \__/\ | | | |
\_/\__,_|___/_| |_/___|\____/ \_/ \_|
A sleek terminal-first Capture The Flag experience
π Welcome to YashzCTF β a compact, terminal-native CTF platform with isolated Docker challenge environments and a lightweight Go backend.
- Terminal-first CTF: play entirely in your shell β no browser required.
- Each challenge runs in its own Docker container for safety and reproducibility.
- Backend (Go) validates flags, tracks scores and progression; CLI client (Python) orchestrates gameplay.
- π CLI client: interactive session, shell attach, flag submission
- π³ Dockerized challenges: one container per level for isolation
- π Live leaderboard: view top players from the terminal
- π Persistent progress: user state stored in MongoDB
- β‘ Fast backend: written in Go for concurrency and performance
Requirements: Python 3.7+, Docker running, network access.
git clone https://github.com/Yash09042004/YashzCTF.git
cd YashzCTF
sudo python3 play.pyThe client will guide you through initial setup (pulling challenge images) and then open an interactive play session.
While in a level prompt (e.g. ctf-1>):
submit flag{...}β submit a flagplayβ open an interactive bash shell inside the challenge containerleaderboardβ show top 10 players (nice purple-styled table)restartβ reset your progress to level 1 (if enabled)deleteβ delete your user account (removes local saved username)exitβ leave current level session
- Backend: Go 1.20+ (single binary)
- Client: Python 3 (CLI)
- Database: MongoDB (Atlas or local)
- Containers: Docker for challenge isolation
| # | Difficulty | Points |
|---|---|---|
| 1 | β Beginner | 100 |
| 2 | β Beginner | 150 |
| 3 | ββ Easy | 200 |
| 4 | ββ Easy | 250 |
| 5 | βββ Medium | 300 |
| 6 | βββ Medium | 350 |
| 7 | ββββ Hard | 400 |
| 8 | ββββ Hard | 450 |
| 9 | βββββ Expert | 500 |
| 10 | βββββ Expert | 1000 |
Total points: 4350
MONGODB_URIβ MongoDB connection string (required)PORTβ optional, default 10000
β οΈ Never commit secrets to the repository. Use environment variables or secret stores.
- Fork the repo, create a branch, open a PR.
- Keep secrets out of commits. Run linters and basic tests before PR.
MIT β free for educational and non-commercial use.
Happy hacking β keep it purple, keep it safe. π
