diff --git a/Makefile b/Makefile index 96254d0..7b71e7a 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ target: $(PYC) $(INSTALL) -d $(DESTDIR)/usr/sbin $(INSTALL) ctfd.py $(DESTDIR)/usr/sbin + $(INSTALL) new-contest $(DESTDIR)/usr/sbin $(INSTALL) -d $(WWWDIR) $(INSTALL) index.html intro.html ctf.css grunge.png $(WWWDIR) diff --git a/new-contest b/new-contest new file mode 100755 index 0000000..2325e44 --- /dev/null +++ b/new-contest @@ -0,0 +1,18 @@ +#! /bin/sh -e + +ctime () { + stat -c %z $1 | awk '{ print $1; }' +} + +rotate () { + mv $1 $1.$(ctime $1) +} + +rotate /var/lib/ctf/puzzler.dat +rotate /var/lib/ctf/scores.dat +rotate /var/lib/ctf/passwd +rm -f /var/lib/ctf/flags/* || true + +echo "Things you may want to tweak:" +find /var/lib/ctf/disabled +find /var/lib/kevin/tokens