diff --git a/.gitignore b/.gitignore index ffaa1b5..2583a78 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ *# *.pyc *.o +bin/ +build/ diff --git a/doc/problems.txt b/doc/problems.txt index 6b1c955..a06f8c6 100644 --- a/doc/problems.txt +++ b/doc/problems.txt @@ -1,14 +1,4 @@ -* "net-re" dash tripping up category validation in puzzler -* scores not preserved in /var/lib/ctf, wtf? -* bletchley 150 no key * claim.cgi not exiting * someone managed to get a point in no category. that broke the scoreboard. -* ha ha, guess what this does if points.log already exists: - install -o root -m 0644 /dev/null /var/lib/ctf/points.log -* scoreboard: teams aren't properly filling columns (make td have size) -* sequence 700 no key -* steg 20 not m4ing key -* no "pointscli" binary -* steg 200 totally screwed up * get LAUR for contest - +* steg point values diff --git a/packages/bletchley/150/key b/packages/bletchley/150/key index 1349adc..268a648 100644 --- a/packages/bletchley/150/key +++ b/packages/bletchley/150/key @@ -1 +1 @@ -jackalope wheeze \ No newline at end of file +jackalope wheeze diff --git a/packages/compaq/100/key b/packages/compaq/100/key index 53d2da6..aebc492 100644 --- a/packages/compaq/100/key +++ b/packages/compaq/100/key @@ -1 +1 @@ -root:x:0:0:root:/root:/bin/bash \ No newline at end of file +root:x:0:0:root:/root:/bin/bash diff --git a/packages/compaq/50/key b/packages/compaq/50/key index 1661a56..973a9fa 100644 --- a/packages/compaq/50/key +++ b/packages/compaq/50/key @@ -1 +1 @@ -4C \ No newline at end of file +4C diff --git a/packages/forensics/100/key b/packages/forensics/100/key index 30383c8..700252b 100755 --- a/packages/forensics/100/key +++ b/packages/forensics/100/key @@ -1 +1 @@ -dll injection \ No newline at end of file +dll injection diff --git a/packages/forensics/200/key b/packages/forensics/200/key index bda2bd0..2174d39 100755 --- a/packages/forensics/200/key +++ b/packages/forensics/200/key @@ -1 +1 @@ -winsecur.dll \ No newline at end of file +winsecur.dll diff --git a/packages/forensics/250/key b/packages/forensics/250/key index 3d9c36f..420b18f 100755 --- a/packages/forensics/250/key +++ b/packages/forensics/250/key @@ -1 +1 @@ -Dirka Dirka \ No newline at end of file +Dirka Dirka diff --git a/packages/mcp/mcp.mk b/packages/mcp/mcp.mk index b37b77e..5920a8c 100644 --- a/packages/mcp/mcp.mk +++ b/packages/mcp/mcp.mk @@ -5,7 +5,7 @@ mcp-install: mcp-build $(call COPYTREE, packages/mcp/bin, $(MCP_PKGDIR)/bin) cp packages/mcp/src/in.tokend $(MCP_PKGDIR)/bin/ - cp packages/mcp/src/tokencli $(MCP_PKGDIR)/bin/ + cp packages/mcp/src/pointscli $(MCP_PKGDIR)/bin/ cp packages/mcp/src/tokencli $(MCP_PKGDIR)/bin/ cp packages/mcp/src/puzzles.cgi $(MCP_PKGDIR)/bin/ diff --git a/packages/mcp/src/claim.cgi.c b/packages/mcp/src/claim.cgi.c index 95b22cc..0fe73f3 100644 --- a/packages/mcp/src/claim.cgi.c +++ b/packages/mcp/src/claim.cgi.c @@ -73,7 +73,6 @@ main(int argc, char *argv[]) } } - cgi_page("Point awarded", ""); return 0; diff --git a/packages/mcp/src/common.c b/packages/mcp/src/common.c index 3b91cd9..15d1a67 100644 --- a/packages/mcp/src/common.c +++ b/packages/mcp/src/common.c @@ -70,6 +70,9 @@ read_char_stdin() if (inlen > POST_MAX) { inlen = POST_MAX; } + if (inlen < 0) { + inlen = 0; + } } else { inlen = 0; } diff --git a/packages/net-re/1000/key b/packages/net-re/1000/key index cbd06d9..a524544 100644 --- a/packages/net-re/1000/key +++ b/packages/net-re/1000/key @@ -1 +1 @@ -a difficult key! \ No newline at end of file +a difficult key! diff --git a/packages/packages.mk b/packages/packages.mk index 89d3c4c..3a9ce69 100644 --- a/packages/packages.mk +++ b/packages/packages.mk @@ -7,11 +7,13 @@ endef define STANDARD_PUZZLE t=$(strip $1) -$t-install: +$t-install: $t-stdinstall +$t-stdinstall: mkdir -p $(BUILD)/$t ./mkpuzzles packages/$t $(BUILD)/$t -$t-clean: +$t-clean: $t-stdclean +$t-stdclean: rm -rf $(BUILD)/$t $(BIN)/$t.pkg PACKAGES += $t diff --git a/pwnables/service/sshd.pwn/log/run b/packages/pwnables/service/sshd.pwn/log/run similarity index 100% rename from pwnables/service/sshd.pwn/log/run rename to packages/pwnables/service/sshd.pwn/log/run diff --git a/pwnables/service/sshd.pwn/rsa.key b/packages/pwnables/service/sshd.pwn/rsa.key similarity index 100% rename from pwnables/service/sshd.pwn/rsa.key rename to packages/pwnables/service/sshd.pwn/rsa.key diff --git a/pwnables/service/sshd.pwn/run b/packages/pwnables/service/sshd.pwn/run similarity index 100% rename from pwnables/service/sshd.pwn/run rename to packages/pwnables/service/sshd.pwn/run diff --git a/packages/sequence/700/key b/packages/sequence/700/key index b26eb5a..8cfadfd 100644 --- a/packages/sequence/700/key +++ b/packages/sequence/700/key @@ -1 +1 @@ -01 00 00 ca 0a \ No newline at end of file +01 00 00 ca 0a diff --git a/packages/steg/20/Makefile b/packages/steg/20/Makefile index da0ef66..73e022d 100644 --- a/packages/steg/20/Makefile +++ b/packages/steg/20/Makefile @@ -7,7 +7,8 @@ src.jpg: wget -O src.jpg $(IMG) file.jpg: src.jpg - cat src.jpg text.txt > $@ + cat src.jpg > $@ + m4 -DKEY="$(shell cat key)" text.txt > $@ clean: rm -f file.jpg diff --git a/packages/steg/200/key b/packages/steg/200/key index 1aadabe..06bfde4 100644 --- a/packages/steg/200/key +++ b/packages/steg/200/key @@ -1 +1 @@ -key \ No newline at end of file +key diff --git a/packages/steg/200/text.txt b/packages/steg/200/text.txt index 0797787..584ce82 100644 --- a/packages/steg/200/text.txt +++ b/packages/steg/200/text.txt @@ -80,4 +80,4 @@ All these aforesaid customs and liberties which we have granted to be held in ou We, holding these aforesaid gifts and grants to be right and welcome, conceed and confirm them for ourselves and our heirs and by the terms of the present (letters) renew them, wishing and granting for ourselves and our heirs that the aforesaid charter is to be firmly and inviably observed in all and each of its articles in perpetuity, including any articles contained in the same charter which by chance have not to date been observed. In testimony of which we have had made these our letters patent. Witnessed by Edward our son, at Westminster on the twelfth day of October in the twenty-fifth year of our reign. (Chancery warranty by John of) Stowe. -The key is "KEY". +The key isn't here. Keep looking. diff --git a/packages/steg/40/key b/packages/steg/40/key index 4a596d0..aa39b51 100644 --- a/packages/steg/40/key +++ b/packages/steg/40/key @@ -1 +1 @@ -breadfruit chawbacon \ No newline at end of file +breadfruit chawbacon diff --git a/packages/steg/steg.mk b/packages/steg/steg.mk index 243f852..fbcad46 100644 --- a/packages/steg/steg.mk +++ b/packages/steg/steg.mk @@ -1 +1,9 @@ $(eval $(call STANDARD_PUZZLE, steg)) + +STEG_SUBMAKES = $(wildcard packages/steg/*/Makefile) +STEG_SUBCLEANS = $(patsubst %/Makefile, %/clean, $(STEG_SUBMAKES)) + +steg-clean: $(STEG_SUBCLEANS) + +packages/steg/%/clean: + $(MAKE) -C $(@D) clean