Skip to content

Yash09042004/YashzCTF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🟣 YashzCTF β€” Purple Hacker CLI CTF

Pixel Art

__   __        _         _____ ___________ 
\ \ / /       | |       /  __ \_   _|  ___|
 \ 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.


What this project is

  • 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.

Key Features

  • 🐍 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

Quick local run (client-only)

Requirements: Python 3.7+, Docker running, network access.

git clone https://github.com/Yash09042004/YashzCTF.git
cd YashzCTF
sudo python3 play.py

The client will guide you through initial setup (pulling challenge images) and then open an interactive play session.


In-game commands

While in a level prompt (e.g. ctf-1>):

  • submit flag{...} β€” submit a flag
  • play β€” open an interactive bash shell inside the challenge container
  • leaderboard β€” 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

Tech Stack

  • Backend: Go 1.20+ (single binary)
  • Client: Python 3 (CLI)
  • Database: MongoDB (Atlas or local)
  • Containers: Docker for challenge isolation

Challenges (summary)

# 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


Env vars (backend)

  • MONGODB_URI β€” MongoDB connection string (required)
  • PORT β€” optional, default 10000

⚠️ Never commit secrets to the repository. Use environment variables or secret stores.


Contributing

  • Fork the repo, create a branch, open a PR.
  • Keep secrets out of commits. Run linters and basic tests before PR.

License

MIT β€” free for educational and non-commercial use.


Happy hacking β€” keep it purple, keep it safe. πŸ’œ

About

A fully CLI based ctf with interactive levels where you solve the levels find the flags and submit the flags on your terminal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages