diff --git a/doc/todo.txt b/doc/todo.txt index 79483aa..6380f26 100644 --- a/doc/todo.txt +++ b/doc/todo.txt @@ -1,5 +1,5 @@ Things That Need Fixin' ======================= -* puzzles.cgi really needs to cross out points your team has claimed. -* Make an OpenWRT router image for a FitPC +* Do something about all the symbolic links in the build tree +* Make arc4 global somehow diff --git a/packages/mcp/bin/addteam b/packages/mcp/bin/addteam index 2116259..8310e79 100755 --- a/packages/mcp/bin/addteam +++ b/packages/mcp/bin/addteam @@ -49,3 +49,6 @@ echo "$1" > $base/teams/names/$hash echo "$color" > $base/teams/colors/$hash echo "Registered with hash: $hash" + +# Create encrypted listing of teams +ls $base/teams/names | KEY="Too much cheese." | /opt/mcp/bin/arc4 > $www/teams.txt diff --git a/packages/mcp/src/Makefile b/packages/mcp/src/Makefile index abf9e7d..35fa5c5 100644 --- a/packages/mcp/src/Makefile +++ b/packages/mcp/src/Makefile @@ -1,7 +1,7 @@ CFLAGS = -Wall -Werror TARGETS = in.tokend tokencli claim.cgi TARGETS += puzzler.cgi puzzles.cgi -TARGETS += pointscli mktoken +TARGETS += pointscli mktoken arc4 all: build @@ -11,6 +11,7 @@ in.tokend: in.tokend.o arc4.o common.o tokencli: tokencli.o arc4.o pointscli: pointscli.o common.o mktoken: mktoken.o common.o +arc4: arc4-main.o arc4.o puzzles.cgi: puzzles.cgi.o common.o claim.cgi: claim.cgi.o common.o diff --git a/packages/mcp/src/arc4-main.c b/packages/mcp/src/arc4-main.c new file mode 120000 index 0000000..d91405e --- /dev/null +++ b/packages/mcp/src/arc4-main.c @@ -0,0 +1 @@ +../../tokens/src/arc4-main.c \ No newline at end of file diff --git a/packages/mcp/tokend.keys/tanks b/packages/mcp/tokend.keys/tanks new file mode 100644 index 0000000..15df993 --- /dev/null +++ b/packages/mcp/tokend.keys/tanks @@ -0,0 +1 @@ +U'0mqp \ No newline at end of file diff --git a/packages/mktokendkey b/packages/mktokendkey new file mode 100755 index 0000000..366b5a9 --- /dev/null +++ b/packages/mktokendkey @@ -0,0 +1,19 @@ +#! /bin/sh + +if [ $# -lt 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then + echo "Usage: $0 CATEGORY" + echo + echo "Creates tokend key for CATEGORY." + exit 1 +fi + +puz=$1; shift +cat=${1:-$puz} + +d=$(dirname $0) + +td=$d/mcp/tokend.keys/$cat +echo "Writing new server key to $td" +dd bs=1 count=16 if=/dev/urandom of=$td + +hd $td diff --git a/packages/tanks/service/tanks/category.key b/packages/tanks/service/tanks/category.key new file mode 100644 index 0000000..15df993 --- /dev/null +++ b/packages/tanks/service/tanks/category.key @@ -0,0 +1 @@ +U'0mqp \ No newline at end of file diff --git a/packages/tanks/service/tanks/run b/packages/tanks/service/tanks/run new file mode 100755 index 0000000..4152843 --- /dev/null +++ b/packages/tanks/service/tanks/run @@ -0,0 +1,6 @@ +#! /bin/sh + +mkdir -p /var/lib/ctf/tanks +mkdir -p /var/lib/ctf/tanks/www +mkdir -p /var/lib/ctf/tanks/players +exec ./tanksd diff --git a/packages/tanks/service/tanks/tanksd b/packages/tanks/service/tanks/tanksd new file mode 100755 index 0000000..ef06f22 --- /dev/null +++ b/packages/tanks/service/tanks/tanksd @@ -0,0 +1,116 @@ +#! /bin/sh + +d=/var/lib/ctf/tanks +p=$d/players +w=$d/www + +mkdir -p $w $p + +summary () { + cat < + + + Tanks + + + +

Tanks

+

New here? Start with the introduction.

+

New round every minute.

+

Round results

+