Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Capture The Flag

Create your own Capture the Flags

Screenshot 2026-04-04 200250

Description

Wanted to create a standalone CTF server to host offline.

HIGHLY RECOMMEND not using a special password, hashing has not been added yet.

Usernames and passwords are stored in /ctf/data/users.yaml

Tasks and flags are stored in /ctf/data/flags.yaml

Flag submissions are stored in /ctf/data/submissions.yaml

You can modify any of those files to reset users, flags and submissions.


Dependencies

pip install flask pyyaml

Install

Git this repo

git clone https://github.com/bwithe/ctf

Start the webserver

cd ctf/app
python main.py

Dockerfile build

Build the image

docker build -t ctf .

Start the container

docker run -d -p 8000:8000 --name ctf --hostname ctf ctf-image

Docker setup

Pull python image

docker pull python:3.11-slim

Start the container

docker run -it --name ctf --hostname ctf -p 80:8000 <image> bash

Update and install dependencies

apt udapte
apt install wget nano git -y
pip install flask pyyaml

Git this repo

git clone https://github.com/bwithe/ctf

Start the webserver

cd ctf/app
python main.py

Screenshots

Login

Screenshot 2026-04-04 195836

Register

Screenshot 2026-04-04 195906

Home

Screenshot 2026-04-04 195923

CTF Management

Screenshot 2026-04-04 200003

Capture The Flags

Screenshot 2026-04-04 200245

Leaderboard

Screenshot 2026-04-04 200250

About

Create your own Capture the Flags

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages