moth/doc/packages.txt

69 lines
1.8 KiB
Plaintext

CTF Packages
============
Packages are squashfs files.
A hypothetical package named pkgname.sfs will be mounted under
/opt/pkgname. The following top-level files and directories are
significant:
* /setup - Run after package is mounted
* /bin/ - Added to $PATH for login shells
* /puzzles/ - Appears as a puzzle category (see "Puzzles" below)
* /answers.txt - Puzzle answers for category pkgname (see "Puzzles" below)
setup script
------------
The setup script (if it exists and is executable) will be run from within
the mounted directory. This is mostly so you can copy things out of your
read-only package and into read/write areas.
Don't start your service here, instead, make a new directory in
/var/service and place a "run" script in it. More information can be found
at <http://smarden.org/runit/>.
Some common actions in setup:
cp -r service/* /var/service # Install startup services
# Set up a file with ownership
install -o ctf -m 0644 /var/lib/ctf/whatever.db
Puzzles
-------
To expose puzzles, place them in the /puzzles/ directory, like so:
/puzzles/10/index.html
/puzzles/20/index.html
/puzzles/20/script.cgi
/puzzles/30/index.html
/puzzles/30/something.jpg
/puzzles/40/index.html
where the second directory is the point value of the puzzle. This means
that no two puzzles in a category can have the same point value.
Files will be served up from the web server, and CGI scripts will be
executed.
Store answers to your puzzles in /answers.txt. Answers are one per
line, with the point value appearing first, followed by a space, then
the answer. Answers are case sensitive. You may have multiple answers
for each point value.
10 zip file
10 zip
10 ZIP
10 pkzip
10 PKZIP
20 varname
30 JFIF
40 0x8040fe67
40 8040FE67
40 8040fe67