diff --git a/doc/problems.txt b/doc/problems.txt index 3b9b98f..6ad9463 100644 --- a/doc/problems.txt +++ b/doc/problems.txt @@ -1,2 +1,2 @@ * claim.cgi not exiting (maybe fixed?) -* get LAUR for contest + diff --git a/packages/mcp/bin/addteam b/packages/mcp/bin/addteam index 8310e79..f2773d1 100755 --- a/packages/mcp/bin/addteam +++ b/packages/mcp/bin/addteam @@ -51,4 +51,5 @@ 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 +ls $base/teams/names | KEY="Too much cheese." /opt/mcp/bin/arc4 > $www/teams.txt.$$ +mv $www/teams.txt.$$ $www/teams.txt diff --git a/packages/mcp/bin/scoreboard b/packages/mcp/bin/scoreboard index 0a2e365..b495677 100755 --- a/packages/mcp/bin/scoreboard +++ b/packages/mcp/bin/scoreboard @@ -30,18 +30,18 @@ function escape(s) { return s } -function print_bar(cat, team, n, d) { +function print_bar(cat, teamid, teamname, n, d) { printf("
\n" \ " %s: %s\n" \ "
", - team, + teamid, 100 * n / d, - team, - team, - cat, escape(names_by_team[team]), n) + teamid, + teamid, + cat, escape(name), n) } function output( t, c) { @@ -203,7 +203,7 @@ BEGIN { for (team in teams) { if (scores[i] == scores_by_team_time[team, lasttime]) { name = names_by_team[team] - print_bar("total", teams[team], scores[i], ncats) + print_bar("total", teams[team], name, scores[i], ncats) } } } @@ -232,7 +232,7 @@ BEGIN { points = points_by_cat_team[cat, team] if (l[j] == points) { name = names_by_team[team] - print_bar(cat, teams[team], points, points_by_cat[cat]) + print_bar(cat, teams[team], name, points, points_by_cat[cat]) } } } @@ -242,7 +242,7 @@ BEGIN { print " " print " " - print " " + print " " print "

About scoring

" print " " print "" diff --git a/packages/mcp/mcp.mk b/packages/mcp/mcp.mk index 96c2115..6d068f7 100644 --- a/packages/mcp/mcp.mk +++ b/packages/mcp/mcp.mk @@ -8,6 +8,7 @@ mcp-install: mcp-build 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/ + cp packages/mcp/src/arc4 $(MCP_PKGDIR)/bin/ $(call COPYTREE, packages/mcp/service, $(MCP_PKGDIR)/service) diff --git a/packages/mcp/service/tokend/run b/packages/mcp/service/tokend/run index ba75674..211a9b9 100755 --- a/packages/mcp/service/tokend/run +++ b/packages/mcp/service/tokend/run @@ -4,7 +4,7 @@ exec 2>&1 DB=/var/lib/ctf/tokens.db -if [ ! -f $DB ]; do +if [ ! -f $DB ]; then # Append any package-provided tokens cat /opt/*/tokens >$DB 2>/dev/null chown ctf $DB diff --git a/packages/mcp/www/ctf.css b/packages/mcp/www/ctf.css index 90fff8a..42e9902 100644 --- a/packages/mcp/www/ctf.css +++ b/packages/mcp/www/ctf.css @@ -37,12 +37,11 @@ a img { a { text-decoration: underline; color: #84b; - font-weight: bold; } a:hover { + color: #2a4; background: #333; - font-weight: bold; } @@ -69,7 +68,11 @@ th { } td { vertical-align: top; - text-align: right; + text-align: left; +} + +dt { + font-weight: bold; } p { @@ -83,42 +86,28 @@ hr { -/*** left side bar ***/ +/*** navigation bar ***/ -#navigation { - position: absolute; - background: HBG; - opacity: 0.9; - top: 80px; - left: 0px; - padding: 0; +nav h2 { + display: none; } -#navigation h3 { - font-size: 100%; - border-bottom: 2px solid #333; +nav ul { + list-style: none; + text-align: center; } -#navigation ul { - list-style: none; - padding: 0; - margin: 0; +nav li { + display: inline; } -#navigation li a { - display: block; - height: 25px; - width: 90px; - padding: 5px; - margin: 5px; - border-right: 4px solid #ddc; +nav li a { text-transform: lowercase; font-size: 0.9em; } -#navigation li a:hover { - background: #333; - border-right-color: #b71; +nav li + li:before { + content: " | "; } /**** special cases ****/ @@ -134,12 +123,12 @@ hr { text-align: center; } -.scoreboard { +#scoreboard { background: #112; } -.scoreboard td { - height: 400px; +#scoreboard td { + height: 300px; } #battlefield { @@ -149,19 +138,3 @@ hr { .solved { text-decoration: line-through; } - -table.pollster { - margin-left: 5em; -} - -table.pollster td { - padding: 2px 1em 2px 5px; -} - -table.pollster thead { - font-weight: bold; -} - -table.scoreboard { - height: 400px; -} diff --git a/packages/tanks/html/designer.cgi b/packages/tanks/html/designer.cgi new file mode 100755 index 0000000..7a9800c --- /dev/null +++ b/packages/tanks/html/designer.cgi @@ -0,0 +1,4 @@ +#! /bin/sh + +BASE_PATH=/var/lib/ctf/tanks/players/; export BASE_PATH +exec /opt/tanks/bin/designer.cgi diff --git a/packages/tanks/www/designer.html b/packages/tanks/html/designer.html similarity index 99% rename from packages/tanks/www/designer.html rename to packages/tanks/html/designer.html index be45406..196f249 100644 --- a/packages/tanks/www/designer.html +++ b/packages/tanks/html/designer.html @@ -2,7 +2,7 @@ Tank Designer - +