Fall 2010 NSM wrap up / archive

This commit is contained in:
Neale Pickett 2010-10-27 14:49:54 -06:00
parent 94dba25367
commit d51ff8aa1f
20 changed files with 8233 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,130 @@
eb61eebd sequence 1
eb61eebd sequence 2
d54880f0 steg 1
2f509be5 sequence 1
5d074b3d sequence 1
d54880f0 bletchley 50
5d074b3d sequence 2
d54880f0 sequence 1
eb61eebd steg 1
5d074b3d sequence 8
5d074b3d sequence 16
d54880f0 sequence 2
5d074b3d sequence 19
5d074b3d sequence 25
5d074b3d sequence 35
d54880f0 sequence 8
5d074b3d sequence 50
2f509be5 sequence 2
eb61eebd sequence 100
2f509be5 sequence 8
2f509be5 sequence 16
5d074b3d steg 2
eb61eebd sequence 16
2f509be5 sequence 19
eb61eebd sequence 19
2f509be5 sequence 25
eb61eebd sequence 25
2f509be5 sequence 35
2f509be5 sequence 50
d54880f0 sequence 16
2f509be5 sequence 100
eb61eebd sequence 8
d54880f0 sequence 19
2f509be5 sequence 200
5d074b3d sequence 100
eb61eebd netre 1
eb61eebd sequence 50
eb61eebd sequence 200
5d074b3d sequence 200
d54880f0 netre 1
d54880f0 sequence 25
2f509be5 netre 1
d54880f0 sequence 35
5d074b3d netre 2
d54880f0 sequence 50
d54880f0 netre 2
5d074b3d bletchley 50
eb61eebd netre 2
2f509be5 netre 2
eb61eebd netre 3
d54880f0 sequence 100
d54880f0 sequence 200
2f509be5 steg 3
2f509be5 steg 1
2f509be5 steg 2
d54880f0 bletchley 100
817fa24c sequence 300
2f509be5 bletchley 100
eb61eebd netre 4
d54880f0 netre 3
d54880f0 netre 4
d54880f0 netre 5
eb61eebd bletchley 100
d54880f0 netre 6
d54880f0 steg 2
d54880f0 sequence 400
2f509be5 netre 4
eb61eebd steg 2
2f509be5 sequence 400
d54880f0 netre 7
eb61eebd sequence 450
2f509be5 netre 5
eb61eebd sequence 400
2f509be5 netre 3
d54880f0 bletchley 150
2f509be5 netre 6
5d074b3d steg 1
5d074b3d sequence 400
817fa24c sequence 1
2f509be5 netre 7
817fa24c bletchley 100
5d074b3d bletchley 100
2f509be5 sequence 450
d54880f0 sequence 450
5d074b3d sequence 450
eb61eebd sequence 35
d54880f0 sequence 600
d54880f0 netre 8
eb61eebd steg 10
5d074b3d netre 5
d54880f0 steg 10
d54880f0 sequence 700
5d074b3d netre 6
d54880f0 netre 10
eb61eebd sequence 700
2f509be5 sequence 700
2f509be5 steg 10
d54880f0 netre 20
2f509be5 sequence 600
2f509be5 netre 8
5d074b3d sequence 600
d54880f0 netre 30
2f509be5 netre 10
2f509be5 netre 20
d54880f0 bletchley 200
d54880f0 netre 100
2f509be5 netre 30
2f509be5 netre 100
eb61eebd netre 10
2f509be5 bletchley 50
5d074b3d sequence 700
5d074b3d netre 1
d54880f0 steg 20
eb61eebd netre 200
eb61eebd netre 250
d54880f0 netre 300
2f509be5 steg 20
eb61eebd netre 20
2f509be5 netre 200
5d074b3d netre 4
eb61eebd steg 20
d54880f0 netre 400
d54880f0 netre 200
2f509be5 netre 250
eb61eebd netre 400
eb61eebd steg 200
2f509be5 steg 200
2f509be5 netre 300
d54880f0 steg 200
2f509be5 netre 400

View File

@ -0,0 +1 @@
ff66ff

View File

@ -0,0 +1 @@
8888ff

View File

@ -0,0 +1 @@
8c7a69

View File

@ -0,0 +1 @@
44ff44

View File

@ -0,0 +1 @@
fore!

View File

@ -0,0 +1 @@
termin8r

View File

@ -0,0 +1 @@
t3am

View File

@ -0,0 +1 @@
Special Characters

File diff suppressed because it is too large Load Diff

117
doc/2010-10-NSM/summary.txt Normal file
View File

@ -0,0 +1,117 @@
Network Security Monitoring Summit
==================================
October 11-15, 2010, PNNL, Richland, WA
After kicking the idea around at the DOE CYSEC conference in Atlanta
earlier this year, Kevin and I were invited to run a smaller version of
Tracer FIRE at the Fall NSM summit. Kevin had to pull out due to lack
of management support, but I said I could still run a full event.
I was asked if I could also provide training. I agreed to run the
"net-re" category, but this fell through as they got enough other
presenters. The contest was scheduled to go on for a 4-hour slot. I
noted my event could be used as a buffer, since it could run for many
hours.
To prepare for this event, I added or fleshed out a few categories:
* steg (steganography)
* octopus (rapid network programming)
* logger (logfile parsing)
* printf (stack analysis/manipulation through printf)
* pwnables (system administration)
I rewrote the core infrastructure in C--it had been in Python--in an
attempt to get Python out of the build. Python does not support
cross-compiling, and Buildroot packages Python 2.5 (several years old)
since it is the most recent version that can be tricked into
cross-compiling. There is no remaining Python code in the build.
I also changed the build in such a way that functionality could be put
into packages, and packages cherry-picked for each contest. This
removes the requirement to constantly re-build the entire image, while
still providing most of the benefits gained from most of the server
being read-only. It also allows for much larger packages than what fits
in RAM, which was a last minute problem at TF2. Package size is now
bounded only by the size of a squashfs (16EiB).
The contest was also redesigned to remove the "flag server" and replace
it with "tokens", good for one point each in a category. It was
difficult to design puzzles around the "flag server" concept, but far
more natural to come up with puzzles which hand out tokens. This meant
the demise of the well-liked "badmath" category, the ill-concieved
"kevin" category, and the "black box" categories ("pwnables" being a
start at replacing this functionality).
After everything was created and somewhat tested, I estimated I had
enough material for about 60 hours of contest.
Due to scheduling problems and the death of one presenter (!), I was
asked to run the event for 12 hours instead of the initial 4.
Categories enabled
------------------
* steg
* octopus
* pwnables
* logger
* sequence
* net-re
* bletchley
Problems
--------
Leaving for the event I was not comfortable with the sparse amount of
testing we were able to perform.
There were a few problems which required intimate knowledge of the
system to remedy on the spot. Several of these were serious:
* the scoring system refused to recognize "net-re" as a valid category
* some puzzles (especially in the steg category) didn't accept the
correct answer
Point values assigned to puzzles in steg arose as a major issue, causing
one of the more advanced contestants to give up in frustration at around
hour 9. He had been working hard on a 5 point puzzle when someone
leapfrogged him with a 20 point puzzle which required much less effort.
Many of the more advanced aspects to puzzles were not discovered. For
instance, only 1 out of 5 tokens in logger was discovered. Only 1 out
of 4 pwnables were attempted by any team.
A UDP scan, it turns out, is very slow. Nobody found Octopus until I
told them where it was, and by then it was too late to expect any
results.
The wireless router slowed down TCP port scans tremendously.
Successes
---------
Fairly good progress was made in bletchley. This was the first contest
in which anybody made any progress in this category.
The reduced number of categories worked well.
Careful team composition worked out much better than the haphazard team
composition at TF2.
The network infrastructure (a WL520-GU running OpenWRT) was once again
fully up to the task.
After talking with the contestant who gave up, and asking him to help me
solve the problem, he was much more positive about the event.
Everyone said they had a good time and learned new things.
All software bugs were recoverable. The core game infrastructure proved
reliable.
There was a lot of buzz about our CTF exercise.

140
doc/2010-10-NSM/www/ctf.css Normal file
View File

@ -0,0 +1,140 @@
/* green phosphor: #2a4 */
/**** document ****/
html {
background: #112 url(grunge.png) repeat-x;
}
body {
font-family: sans-serif;
color: #ddc;
padding: 10px;
max-width: 700px;
}
/**** heading ****/
h1:first-child {
text-transform: lowercase;
font-size: 1.6em;
padding: 3px;
margin: 0 0 1em 70px;
}
h1:first-child:before {
color: #ddc;
letter-spacing: -0.1em;
content: "Capture The Flag: ";
}
/**** body ****/
a img {
border: 0px;
}
a {
text-decoration: underline;
color: #84b;
}
a:hover {
color: #2a4;
background: #333;
}
h1, h2, h3 {
color: #b71;
letter-spacing: -0.05em;
}
.readme {
background-color: #333;
margin: 1em;
}
pre {
background-color: #333;
border: solid #ddc 2px;
padding: 0.25em;
}
th {
vertical-align: top;
text-align: center;
}
td {
vertical-align: top;
text-align: left;
}
dt {
font-weight: bold;
}
p {
line-height: 1.4em;
margin-bottom: 20px;
}
hr {
border: 1px solid #ddc;
}
/*** navigation bar ***/
nav h2 {
display: none;
}
nav ul {
list-style: none;
text-align: center;
}
nav li {
display: inline;
}
nav li a {
text-transform: lowercase;
font-size: 0.9em;
}
nav li + li:before {
content: " | ";
}
/**** special cases ****/
.wide {
max-width: inherit;
}
.figure {
margin: 0.5em 1em;
float: right;
font-size: small;
text-align: center;
}
#scoreboard {
background: #112;
}
#scoreboard td {
height: 300px;
}
#battlefield {
border: 2px solid green;
}
.solved {
text-decoration: line-through;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,119 @@
<!DOCTYPE html>
<html>
<head>
<title>Scoreboard</title>
<link rel="stylesheet" href="ctf.css" type="text/css">
<script type="application/javascript" src="scoreboard.js"></script>
<script type="application/javascript">
function init() {
plot("chart", 166, 2.35, {
"1854": ["#8888ff",[[1,0.00],[2,0.88],[3,0.76],[4,1.53],[5,1.45],[6,1.10],[7,1.10],[8,0.85],[9,0.85],[10,0.91],[11,0.85],[12,0.79],[13,0.76],[14,0.67],[15,0.65],[16,0.67],[17,0.65],[18,0.64],[19,0.63],[20,0.62],[21,0.61],[22,0.60],[23,0.59],[24,0.59],[25,0.59],[26,0.58],[27,0.53],[28,0.52],[29,0.52],[30,0.57],[31,0.57],[32,0.64],[33,0.63],[34,0.77],[35,0.74],[36,0.74],[37,0.73],[38,0.73],[39,0.73],[40,0.73],[41,0.71],[42,0.71],[43,0.77],[44,0.77],[45,0.76],[46,0.74],[47,0.74],[48,0.74],[49,0.74],[50,0.74],[51,0.73],[52,0.65],[53,0.65],[54,0.65],[55,0.65],[56,0.65],[57,0.71],[58,0.67],[59,0.65],[60,0.70],[61,0.70],[62,0.68],[63,0.67],[64,0.66],[65,0.65],[66,0.64],[67,0.61],[68,0.61],[69,0.61],[70,0.61],[71,0.61],[72,0.60],[73,0.60],[74,0.65],[75,0.65],[76,0.63],[77,0.63],[78,0.63],[79,0.64],[80,0.64],[81,0.64],[82,0.59],[83,0.59],[84,0.59],[85,0.60],[86,0.60],[87,0.60],[88,0.58],[89,0.58],[90,0.58],[91,0.58],[92,0.59],[93,0.59],[94,0.59],[95,0.58],[96,0.84],[97,0.81],[98,0.90],[99,0.83],[100,0.78],[101,0.75],[102,0.73],[103,0.97],[104,0.97],[105,0.97],[106,0.97],[107,0.96],[108,0.96],[109,1.01],[110,1.01],[111,1.01],[112,1.01],[113,1.01],[114,1.01],[115,1.02],[116,0.99],[117,0.99],[118,0.98],[119,0.96],[120,0.95],[121,0.96],[122,0.96],[123,0.96],[124,0.96],[125,0.96],[126,0.94],[127,0.94],[128,0.94],[129,0.94],[130,0.94],[131,0.94],[132,0.94],[133,0.94],[134,0.94],[135,0.94],[136,0.94],[137,0.94],[138,0.94],[139,0.94],[140,0.94],[141,0.94],[142,0.93],[143,0.93],[144,0.93],[145,0.92],[146,0.92],[147,0.91],[148,0.91],[149,0.91],[150,0.90],[151,0.90],[152,0.89],[153,0.89],[154,0.89],[155,0.88],[156,0.88],[157,0.88],[158,0.88],[159,0.88],[160,0.87],[161,0.87],[162,0.87],[163,0.87],[164,0.87],[165,0.86],]],
"1972": ["#44ff44",[[1,1.00],[2,0.52],[3,0.86],[4,1.12],[5,1.39],[6,1.22],[7,1.13],[8,1.08],[9,1.04],[10,1.03],[11,1.05],[12,1.09],[13,0.92],[14,1.08],[15,1.03],[16,1.02],[17,1.15],[18,1.11],[19,1.10],[20,1.06],[21,1.05],[22,1.14],[23,1.13],[24,1.12],[25,1.08],[26,1.14],[27,1.05],[28,1.01],[29,1.00],[30,0.98],[31,1.00],[32,0.98],[33,0.97],[34,0.96],[35,0.93],[36,0.93],[37,0.94],[38,0.94],[39,0.93],[40,0.94],[41,0.92],[42,0.93],[43,0.92],[44,0.93],[45,0.93],[46,0.92],[47,0.92],[48,0.92],[49,0.93],[50,0.93],[51,0.91],[52,1.24],[53,1.24],[54,1.24],[55,1.25],[56,1.25],[57,1.24],[58,1.10],[59,1.08],[60,1.06],[61,1.06],[62,1.13],[63,1.11],[64,1.11],[65,1.03],[66,1.03],[67,1.00],[68,1.00],[69,1.00],[70,1.00],[71,1.00],[72,1.00],[73,1.00],[74,0.98],[75,0.99],[76,0.97],[77,0.97],[78,0.97],[79,0.97],[80,0.97],[81,0.96],[82,0.93],[83,0.93],[84,0.93],[85,0.93],[86,0.93],[87,0.93],[88,0.91],[89,0.91],[90,0.90],[91,0.90],[92,0.90],[93,0.90],[94,0.90],[95,1.89],[96,1.64],[97,1.56],[98,1.33],[99,1.39],[100,1.40],[101,1.40],[102,1.40],[103,1.26],[104,1.26],[105,1.26],[106,1.26],[107,1.25],[108,1.25],[109,1.23],[110,1.23],[111,1.24],[112,1.23],[113,1.23],[114,1.23],[115,1.23],[116,1.15],[117,1.44],[118,1.63],[119,1.40],[120,1.48],[121,1.48],[122,1.45],[123,1.45],[124,1.42],[125,1.54],[126,1.99],[127,1.65],[128,1.66],[129,1.66],[130,1.53],[131,1.53],[132,1.52],[133,1.52],[134,1.53],[135,1.52],[136,1.52],[137,1.53],[138,1.52],[139,1.53],[140,1.53],[141,1.53],[142,1.53],[143,1.50],[144,1.51],[145,1.51],[146,1.51],[147,1.52],[148,1.52],[149,1.52],[150,1.52],[151,1.53],[152,1.53],[153,1.53],[154,1.53],[155,1.54],[156,1.54],[157,1.54],[158,1.55],[159,1.55],[160,1.56],[161,1.56],[162,1.56],[163,1.57],[164,1.57],[165,1.57],]],
"1861": ["#ff66ff",[[1,0.00],[2,0.01],[3,0.42],[4,0.42],[5,0.52],[6,1.07],[7,1.23],[8,1.34],[9,1.39],[10,1.40],[11,1.75],[12,1.72],[13,1.70],[14,1.54],[15,1.49],[16,1.61],[17,1.52],[18,1.59],[19,1.60],[20,1.58],[21,1.60],[22,1.56],[23,1.57],[24,1.59],[25,1.67],[26,1.65],[27,1.67],[28,1.79],[29,1.80],[30,1.77],[31,1.76],[32,1.73],[33,1.79],[34,1.76],[35,1.81],[36,1.81],[37,1.82],[38,1.83],[39,1.83],[40,1.82],[41,1.80],[42,1.79],[43,1.77],[44,1.77],[45,1.77],[46,1.74],[47,1.74],[48,1.74],[49,1.74],[50,1.74],[51,1.69],[52,1.53],[53,1.52],[54,1.52],[55,1.51],[56,1.51],[57,1.49],[58,1.41],[59,1.39],[60,1.33],[61,1.32],[62,1.30],[63,1.37],[64,1.37],[65,1.55],[66,1.54],[67,1.54],[68,1.54],[69,1.53],[70,1.53],[71,1.53],[72,1.58],[73,1.57],[74,1.55],[75,1.55],[76,1.50],[77,1.54],[78,1.53],[79,1.53],[80,1.52],[81,1.60],[82,1.56],[83,1.55],[84,1.55],[85,1.55],[86,1.55],[87,1.54],[88,1.41],[89,1.41],[90,1.48],[91,1.48],[92,1.48],[93,1.48],[94,1.48],[95,1.64],[96,1.64],[97,1.64],[98,1.64],[99,1.62],[100,1.62],[101,1.62],[102,1.62],[103,1.61],[104,1.61],[105,1.61],[106,1.61],[107,1.66],[108,1.66],[109,1.64],[110,1.64],[111,1.63],[112,1.63],[113,1.63],[114,1.63],[115,1.63],[116,1.52],[117,1.37],[118,1.28],[119,1.52],[120,1.37],[121,1.37],[122,1.35],[123,1.35],[124,1.43],[125,1.39],[126,1.16],[127,1.59],[128,1.59],[129,1.59],[130,1.45],[131,1.45],[132,1.45],[133,1.45],[134,1.45],[135,1.45],[136,1.45],[137,1.45],[138,1.45],[139,1.45],[140,1.44],[141,1.44],[142,1.44],[143,1.52],[144,1.52],[145,1.52],[146,1.52],[147,1.52],[148,1.52],[149,1.52],[150,1.52],[151,1.52],[152,1.52],[153,1.51],[154,1.51],[155,1.51],[156,1.51],[157,1.51],[158,1.51],[159,1.51],[160,1.51],[161,1.51],[162,1.51],[163,1.51],[164,1.51],[165,1.51],]],
"1959": ["#8c7a69",[[1,1.00],[2,1.59],[3,1.96],[4,1.94],[5,1.64],[6,1.61],[7,1.54],[8,1.73],[9,1.72],[10,1.65],[11,1.35],[12,1.40],[13,1.63],[14,1.72],[15,1.83],[16,1.70],[17,1.68],[18,1.66],[19,1.67],[20,1.74],[21,1.74],[22,1.70],[23,1.71],[24,1.70],[25,1.65],[26,1.62],[27,1.75],[28,1.68],[29,1.68],[30,1.67],[31,1.67],[32,1.65],[33,1.60],[34,1.52],[35,1.51],[36,1.51],[37,1.51],[38,1.50],[39,1.50],[40,1.51],[41,1.57],[42,1.57],[43,1.55],[44,1.54],[45,1.54],[46,1.60],[47,1.60],[48,1.60],[49,1.60],[50,1.60],[51,1.66],[52,1.58],[53,1.59],[54,1.59],[55,1.59],[56,1.59],[57,1.57],[58,1.82],[59,1.88],[60,1.91],[61,1.92],[62,1.89],[63,1.86],[64,1.86],[65,1.78],[66,1.78],[67,1.85],[68,1.85],[69,1.85],[70,1.86],[71,1.86],[72,1.82],[73,1.82],[74,1.81],[75,1.81],[76,1.90],[77,1.86],[78,1.86],[79,1.87],[80,1.87],[81,1.80],[82,1.93],[83,1.93],[84,1.93],[85,1.93],[86,1.93],[87,1.93],[88,2.10],[89,2.10],[90,2.03],[91,2.03],[92,2.03],[93,2.03],[94,2.03],[95,1.88],[96,1.88],[97,1.99],[98,2.13],[99,2.16],[100,2.21],[101,2.24],[102,2.26],[103,2.15],[104,2.16],[105,2.16],[106,2.16],[107,2.13],[108,2.14],[109,2.13],[110,2.12],[111,2.12],[112,2.12],[113,2.12],[114,2.12],[115,2.12],[116,2.35],[117,2.20],[118,2.11],[119,2.12],[120,2.20],[121,2.19],[122,2.24],[123,2.25],[124,2.19],[125,2.11],[126,1.91],[127,1.82],[128,1.82],[129,1.82],[130,2.08],[131,2.08],[132,2.08],[133,2.08],[134,2.09],[135,2.09],[136,2.09],[137,2.09],[138,2.09],[139,2.09],[140,2.09],[141,2.09],[142,2.09],[143,2.04],[144,2.04],[145,2.04],[146,2.05],[147,2.05],[148,2.05],[149,2.05],[150,2.06],[151,2.06],[152,2.06],[153,2.07],[154,2.07],[155,2.07],[156,2.06],[157,2.06],[158,2.06],[159,2.06],[160,2.06],[161,2.06],[162,2.06],[163,2.06],[164,2.05],[165,2.05],]],
});
if (location.hash) {
cycle();
setInterval(cycle, 10000);
}
}
window.onload = init;
</script>
<meta http-equiv="refresh" content="60">
<style type="text/css">
body { width: 100%; }
.score { overflow: hidden; color: black; }
.t1854 { background-color: #8888ff; }
.t1972 { background-color: #44ff44; }
.t1861 { background-color: #ff66ff; }
.t1959 { background-color: #8c7a69; }
</style>
</head>
<body>
<h1>Scoreboard</h1>
<p id="debug"></p>
<table id="scoreboard">
<tr>
<th>Overall</th>
<th>bletchley (900)</th>
<th>logger (446)</th>
<th>netre (3350)</th>
<th>pwnables (1396)</th>
<th>sequence (11024)</th>
<th>steg (705)</th>
</tr>
<tr>
<td>
<div class="t1854 score" style="height: 14.40%;" onmouseover="highlight('1854')" onmouseout="restore('1854')">
<!-- total --> termin8r: 0.86
</div><div class="t1861 score" style="height: 25.15%;" onmouseover="highlight('1861')" onmouseout="restore('1861')">
<!-- total --> fore!: 1.51
</div><div class="t1972 score" style="height: 26.23%;" onmouseover="highlight('1972')" onmouseout="restore('1972')">
<!-- total --> Special Characters: 1.57
</div><div class="t1959 score" style="height: 34.22%;" onmouseover="highlight('1959')" onmouseout="restore('1959')">
<!-- total --> t3am: 2.05
</div> </td>
<td>
<div class="t1972 score" style="height: 11.11%;" onmouseover="highlight('1972')" onmouseout="restore('1972')">
<!-- bletchley --> Special Characters: 100
</div><div class="t1854 score" style="height: 16.67%;" onmouseover="highlight('1854')" onmouseout="restore('1854')">
<!-- bletchley --> termin8r: 150
</div><div class="t1861 score" style="height: 16.67%;" onmouseover="highlight('1861')" onmouseout="restore('1861')">
<!-- bletchley --> fore!: 150
</div><div class="t1959 score" style="height: 55.56%;" onmouseover="highlight('1959')" onmouseout="restore('1959')">
<!-- bletchley --> t3am: 500
</div></td>
<td>
<div class="t1854 score" style="height: 27.13%;" onmouseover="highlight('1854')" onmouseout="restore('1854')">
<!-- logger --> termin8r: 121
</div><div class="t1959 score" style="height: 30.72%;" onmouseover="highlight('1959')" onmouseout="restore('1959')">
<!-- logger --> t3am: 137
</div><div class="t1972 score" style="height: 42.15%;" onmouseover="highlight('1972')" onmouseout="restore('1972')">
<!-- logger --> Special Characters: 188
</div></td>
<td>
<div class="t1854 score" style="height: 0.54%;" onmouseover="highlight('1854')" onmouseout="restore('1854')">
<!-- netre --> termin8r: 18
</div><div class="t1972 score" style="height: 26.57%;" onmouseover="highlight('1972')" onmouseout="restore('1972')">
<!-- netre --> Special Characters: 890
</div><div class="t1959 score" style="height: 32.72%;" onmouseover="highlight('1959')" onmouseout="restore('1959')">
<!-- netre --> t3am: 1096
</div><div class="t1861 score" style="height: 40.18%;" onmouseover="highlight('1861')" onmouseout="restore('1861')">
<!-- netre --> fore!: 1346
</div></td>
<td>
<div class="t1854 score" style="height: 15.26%;" onmouseover="highlight('1854')" onmouseout="restore('1854')">
<!-- pwnables --> termin8r: 213
</div><div class="t1972 score" style="height: 23.57%;" onmouseover="highlight('1972')" onmouseout="restore('1972')">
<!-- pwnables --> Special Characters: 329
</div><div class="t1959 score" style="height: 26.93%;" onmouseover="highlight('1959')" onmouseout="restore('1959')">
<!-- pwnables --> t3am: 376
</div><div class="t1861 score" style="height: 34.24%;" onmouseover="highlight('1861')" onmouseout="restore('1861')">
<!-- pwnables --> fore!: 478
</div></td>
<td>
<div class="t1972 score" style="height: 20.92%;" onmouseover="highlight('1972')" onmouseout="restore('1972')">
<!-- sequence --> Special Characters: 2306
</div><div class="t1854 score" style="height: 26.36%;" onmouseover="highlight('1854')" onmouseout="restore('1854')">
<!-- sequence --> termin8r: 2906
</div><div class="t1861 score" style="height: 26.36%;" onmouseover="highlight('1861')" onmouseout="restore('1861')">
<!-- sequence --> fore!: 2906
</div><div class="t1959 score" style="height: 26.36%;" onmouseover="highlight('1959')" onmouseout="restore('1959')">
<!-- sequence --> t3am: 2906
</div></td>
<td>
<div class="t1854 score" style="height: 0.43%;" onmouseover="highlight('1854')" onmouseout="restore('1854')">
<!-- steg --> termin8r: 3
</div><div class="t1972 score" style="height: 33.05%;" onmouseover="highlight('1972')" onmouseout="restore('1972')">
<!-- steg --> Special Characters: 233
</div><div class="t1959 score" style="height: 33.05%;" onmouseover="highlight('1959')" onmouseout="restore('1959')">
<!-- steg --> t3am: 233
</div><div class="t1861 score" style="height: 33.48%;" onmouseover="highlight('1861')" onmouseout="restore('1861')">
<!-- steg --> fore!: 236
</div></td>
</tr>
</table>
<canvas id="chart" width="800" height="300"></canvas>
<p><a href="scoring.html">About scoring</a></p>
</body>
</html>

View File

@ -0,0 +1,120 @@
function dbg(o) {
e = document.getElementById("debug");
e.innerHTML = o;
}
function torgba(color, alpha) {
if (color.substring(0, 1) == "#") {
var r = parseInt(color.substring(1,3), 16);
var g = parseInt(color.substring(3,5), 16);
var b = parseInt(color.substring(5,7), 16);
return "rgba(" + r + "," + g + "," + b + "," + alpha + ")";
} else {
return color;
}
}
function Chart(id, width, height, lines) {
var canvas = document.getElementById(id);
var ctx = canvas.getContext('2d');
// We'll let the canvas do all the tricksy math
var xscale = canvas.width/width;
var yscale = canvas.height/height;
var nlines = lines.length;
function moveTo(x, y) {
ctx.moveTo(Math.round(x * xscale), Math.round((height - y) * yscale));
}
function lineTo(x, y) {
ctx.lineTo(Math.round(x * xscale), Math.round((height - y) * yscale));
}
function draw(color, values) {
var lasty = 0;
ctx.strokeStyle = color;
ctx.lineWidth = 4;
ctx.beginPath();
moveTo(values[0][0], 0);
for (i in values) {
var x = values[i][0];
var y = values[i][1];
lineTo(x, lasty);
lineTo(x, y);
lasty = y;
}
lineTo(width, lasty);
ctx.stroke();
}
this.highlight = function(id, color) {
var line = lines[id];
if (! color) color = line[0];
draw(color, line[1]);
}
for (id in lines) {
var line = lines[id];
draw(line[0], line[1]);
}
}
var thechart;
function plot(id, width, height, lines) {
thechart = new Chart(id, width, height, lines);
}
function getElementsByClass( searchClass, domNode, tagName) {
if (domNode == null) domNode = document;
if (tagName == null) tagName = '*';
var el = new Array();
var tags = domNode.getElementsByTagName(tagName);
var tcl = " "+searchClass+" ";
for(i=0,j=0; i<tags.length; i++) {
var test = " " + tags[i].className + " ";
if (test.indexOf(tcl) != -1)
el[j++] = tags[i];
}
return el;
}
function highlight(cls, color) {
if (! color) color = "#ffffff";
elements = getElementsByClass("t" + cls);
for (i in elements) {
e = elements[i];
e.style.borderColor = e.style.backgroundColor;
e.style.backgroundColor = color;
}
thechart.highlight(cls, color);
}
function restore(cls) {
elements = getElementsByClass("t" + cls);
for (i in elements) {
e = elements[i];
e.style.backgroundColor = e.style.borderColor;
}
thechart.highlight(cls);
}
var state = 0;
function cycle() {
if (state == 0) {
v = document.getElementById("scoreboard");
i = document.getElementById("chart");
} else {
v = document.getElementById("chart");
i = document.getElementById("scoreboard");
}
v.style.display = "block";
i.style.display = "none";
state = (state + 1) % 2;
}