This repository contains CTF event setup material and challenge writeups created by Team z0d1ak.
After cloning the repository, make init.sh executable and run it:
chmod +x init.sh
./init.sh
The repo is organized to help you:
- create a folder for each CTF event
- track event metadata in an event-level
README.md - create category folders for manual writeups
- optionally pull solved challenges from CTFd events
- keep challenge writeups separate and easy to review in git history
A typical event layout looks like this:
Event Name/
├── README.md
├── web/
│ └── Challenge Name/
│ └── README.md
├── pwn/
└── crypto/
- The event-level
README.mdstores event information such as links, timing, format, and description. - Challenge writeups live deeper in the tree, typically at:
<Event>/<Category>/<Challenge>/README.md
Challenge asset files are stored through Git LFS, while writeups and source-style files stay in normal Git.
- event directories are tracked through
.gitattributes README.mdand common source files remain regular Git blobs.lfsconfigexcludes LFS payload downloads by default so fresh clones and pulls stay lightweight
To fetch assets only for one area you need, run:
git lfs pull -I "HACKZERO '26 CTF/**"
To fetch every LFS-backed asset in the repo, run:
git lfs pull
Use add_comp.sh to bootstrap a new competition from either a CTFtime event URL or manually entered event metadata. The flow is interactive and uses a bundled prompt-driven CLI UI for event review, category selection, setup summary, and confirmation.
./add_comp.sh
./add_comp.sh <ctftime_event_url>
./add_comp.sh --manual
Example:
./add_comp.sh https://ctftime.org/event/3171/
add_comp.sh now runs the bundled CLI entrypoint, so contributors only need node 18+ available. A local pnpm install is only needed if you want to modify or rebuild the CLI itself.
add_comp.sh will:
- either fetch event metadata from the CTFtime API or prompt you to enter it manually
- show an event summary before continuing
- ask whether the event uses CTFd
- do one of the following:
- non-CTFd flow: let you select default categories from
categories.txtand optionally add extra categories - CTFd flow: optionally use a player token to fetch solved challenges, create challenge folders, generate challenge
README.mdfiles, and download challenge files; if CTFd leavescategoryblank, the script falls back to challenge tags
- non-CTFd flow: let you select default categories from
- show a setup summary before writing anything to disk
- create an event directory named after the event title
- generate an event-level
README.md, plus either manual category folders or solved CTFd challenge folders
When you run the script, you will be prompted for:
-
Event source
If you start with no arguments, choose whether to fetch from CTFtime or enter the event manually. You can also skip the selector entirely with./add_comp.sh --manual. -
CTFtime event URL
Required only for the CTFtime flow. You can either pass it on the command line or enter it interactively. -
Manual event metadata
For non-CTFtime events, the script will ask for the event title plus optional metadata such as website, format, restrictions, onsite status, timing, participant count, description, Discord link, and live feed URL. -
Uses CTFd?
Choose whether the event runs on CTFd. This works for both CTFtime and manually entered events. -
CTFd base URL
If the event uses CTFd, you can confirm or override the detected site URL. -
Player API token
Optional. If provided, the script can fetch solved challenges from the CTFd API. -
Default categories selection
For non-CTFd events, you can interactively choose categories fromcategories.txt. All defaults are preselected. -
Extra categories
For non-CTFd events, you can add additional comma-separated category names.
This repository is intended to keep event setup and writeup content in separate commits.
- Initialize the CTF first
- create the event scaffold
- make the initial commit for that CTF using:
chore: init {CTF_name}
- Create your working branch
- after the init commit, create a new branch using:
{CTF_name}/{author_name}
- Add writeups one question at a time
- make a single commit per question
- use the following commit message format:
feat: added writeup for "{CTF_name}/{category}/{question name}"
-
Create the event scaffold first
- run
add_comp.sh - review the generated event directory and event-level
README.md - commit that event setup as its own commit using
chore: init {CTF_name}
- run
-
Create your author branch
- create a branch named
{CTF_name}/{author_name}
- create a branch named
-
Add challenge writeups later
- update challenge folders and challenge
README.mdfiles - commit each writeup separately from the initial event scaffold
- use one commit per question with the format
feat: added writeup for "{CTF_name}/{category}/{question name}"
- update challenge folders and challenge
Keeping event creation and writeups in different commits makes it easier to:
- review repository history
- see when an event was added
- track writeup progress over time
- avoid mixing setup changes with solution content
This repo includes a pre-commit hook that can inject an ## Author section into newly added challenge writeups.
The intended behavior is:
- event-level
README.mdchanges should be committed first - challenge writeups should be committed afterward
- if the event-level
README.mdis not part of the commit, writeup author injection may be skipped depending on the hook logic
This supports the workflow of making one commit for the event, then separate commits for individual writeups.
Writeups in this repository are maintained by Team z0d1ak.