Gussy up the HTML

This commit is contained in:
Neale Pickett 2009-09-30 13:58:16 -06:00
parent 46e7971151
commit f82d78bd6a
9 changed files with 173 additions and 43 deletions

View File

@ -19,15 +19,15 @@ target: $(PYC)
$(INSTALL) -d $(CTFDIR) $(INSTALL) -d $(CTFDIR)
$(INSTALL) $(PYC) $(CTFDIR) $(INSTALL) $(PYC) $(CTFDIR)
$(INSTALL) uberserv.py $(CTFDIR) $(INSTALL) ctfd.py $(CTFDIR)
$(INSTALL) -d $(WWWDIR) $(INSTALL) -d $(WWWDIR)
$(INSTALL) index.html ctf.css $(WWWDIR) $(INSTALL) index.html intro.html ctf.css $(WWWDIR)
$(FAKE) ln -s /var/lib/ctf/histogram.png $(WWWDIR) $(FAKE) ln -s /var/lib/ctf/histogram.png $(WWWDIR)
$(INSTALL) register.cgi scoreboard.cgi puzzler.cgi $(WWWDIR) $(INSTALL) register.cgi scoreboard.cgi puzzler.cgi $(WWWDIR)
$(INSTALL) -d $(DESTDIR)/var/service/ctf $(INSTALL) -d $(DESTDIR)/var/service/ctf
$(INSTALL) run.uberserv $(DESTDIR)/var/service/ctf/run $(INSTALL) run.ctfd $(DESTDIR)/var/service/ctf/run
rm -rf $(WWWDIR)/puzzler rm -rf $(WWWDIR)/puzzler
$(INSTALL) -d $(WWWDIR)/puzzler $(INSTALL) -d $(WWWDIR)/puzzler

87
ctf.css
View File

@ -1,26 +1,67 @@
/**** document ****/
html {
background: #222 url(http://dirtbags.net/images/grunge.png) no-repeat;
}
body { body {
background: #000; font-family: sans-serif;
color: #0f0;
}
.readme {
background: #444;
}
a:link {
color: #ff0;
}
a:visited {
color: #880;
}
a:hover {
color: #000;
background: #ff0;
}
.error {
color: #000;
background: #f00;
}
input {
border: 2px solid #088;
color: #fff; color: #fff;
background: #000; margin: 50px 0 0 100px;
padding: 10px;
max-width: 700px;
}
a img {
border: 0px;
}
a {
text-decoration: none;
color: #2a2;
font-weight: bold;
}
a:hover {
color: #fff;
background: #2a2;
font-weight: bold;
}
code, pre, .readme {
color: #fff;
background-color: #555;
margin: 1em;
}
/**** heading ****/
h1:first-child {
text-transform: lowercase;
font-size: 1.6em;
letter-spacing: -0.1em;
background-color: #222;
opacity: 0.9;
padding: 3px;
color: #2a2;
margin: 0 0 1em 70px;
}
h1:first-child:before {
color: #fff;
content: "Capture The Flag: ";
}
/*** body ***/
p {
line-height: 1.4em;
margin-bottom: 20px;
color: #f4f4f4;
}
h1, h2, h3 {
color: #999;
letter-spacing: -0.05em;
} }

View File

@ -5,6 +5,7 @@ import pointsd
import game import game
import flagd import flagd
import histogram import histogram
import config
def main(): def main():
pointsrv = pointsd.start() pointsrv = pointsd.start()

View File

@ -7,16 +7,21 @@
<link rel="stylesheet" href="ctf.css" type="text/css" /> <link rel="stylesheet" href="ctf.css" type="text/css" />
</head> </head>
<body> <body>
<h1>Capture The Flag</h1> <h1>Welcome</h1>
<ol> <ol>
<li><a href="intro.html">Read the introduction</a> to this event</li>
<li><a href="register.cgi">Register</a> your team</li> <li><a href="register.cgi">Register</a> your team</li>
<li><a href="scoreboard.cgi">Scoreboard</a></li> <li><a href="scoreboard.cgi">View the score board</a></li>
</ol> </ol>
<p> <ul>
Some challenges are <a href="puzzler.cgi">puzzles</a>. Some are <li>Some categories are <a href="puzzler.cgi">puzzles</a>.</li>
sitting on the network; you must find these yourself! <li>Some categories live on the network; you have to find them
</p> yourself.</li>
<li>Announcements will be made
on <a href="irc://10.0.0.1/ctf">IRC</a>.</li>
</ul>
</body> </body>
</html> </html>

77
intro.html Normal file
View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Introduction</title>
<link rel="stylesheet" href="ctf.css" type="text/css" />
</head>
<body>
<h1>Introduction</h1>
<p>
Welcome to Capture The Flag, blah blah blah.
</p>
<h2>What This Is</h2>
<ul>
<li>A hacking contest</li>
<li>A chance to witness the nature of real cyber incident response</li>
<li>An opportunity to show off your 1337 skillz</li>
</ul>
<h2>What This Is Not</h2>
<ul>
<li>A LAN party</li>
<li>A chance to talk up how great you think you are</li>
<li>An opportunity to show off your sweet gaming rig</li>
</ul>
<h2>Rules</h2>
<h3>Important Rules</h3>
<ul>
<li>The contest network is 10.<i>x</i>.<i>x</i>.<i>x</i>. <b>Do
not attack machines outside the contest network</b>.</li>
<li>If the "outside network" requires you to plug into a different
switch, do not connect any machine that has been on the contest
network.</li>
<li>Consider this network hostile: your machine may be
compromised.</li>
<li>We expect you to be disruptive within the framework of the
game (malicious code, network scanning, social engineering,
etc.). Disruptive behavior outside the game will result in a
public and humiliating ejection from the contest area.</li>
</ul>
<h3>Less-Important Rules</h3>
<ul>
<li>If IRC is up, you should use it to communicate with the
contest staff. Staff will have operator status in #ctf.</li>
<li>If you think something is wrong with the game, you are
expected to demonstrate the problem and explain why you think
it's a problem.</li>
</ul>
<h2>Hints</h2>
<p>
If you are really stuck, you can ask for a hint. It will cost you
points, though. For puzzles, you will lose ¼ of the points for
that puzzle <em>even if you never solve the puzzle</em>. For
other events, the staff member will decide how many points it will
cost. You can try to bribe us or otherwise fanagle information
out of us, or other contestants. <em>It's a hacking contest.</em>
</p>
<h2>About Us</h2>
<p>
We are the <a href="http://dirtbags.net/">dirtbags</a>. You might
be better at this than we are, but you're not running the contest.
</p>
</body>

View File

@ -61,12 +61,15 @@ for cat in os.listdir(opts.puzzles):
f.write('</ul>\n') f.write('</ul>\n')
f.write(''' f.write('''
<form action="%(cgi)s" method="post"> <form action="%(cgi)s" method="post">
<input type="hidden" name="c" value="%(cat)s" /> <fieldset>
<input type="hidden" name="p" value="%(points)s" /> <legend>Your answer:</legend>
Team: <input name="t" /><br /> <input type="hidden" name="c" value="%(cat)s" />
Password: <input type="password" name="w" /><br /> <input type="hidden" name="p" value="%(points)s" />
Key: <input name="k" /><br /> Team: <input name="t" /><br />
<input type="submit" /> Password: <input type="password" name="w" /><br />
Key: <input name="k" /><br />
<input type="submit" />
</fieldset>
</form> </form>
</body> </body>
</html> </html>

View File

@ -30,7 +30,9 @@ def main():
<form method="post" action="%s"> <form method="post" action="%s">
<fieldset> <fieldset>
<label>Desired Team Team:</label> <legend>Registration information:</legend>
<label>Team Name:</label>
<input type="text" name="team" /> <input type="text" name="team" />
<span class="error">$team_error</span><br /> <span class="error">$team_error</span><br />

4
run.ctfd Executable file
View File

@ -0,0 +1,4 @@
#! /bin/sh
/usr/lib/ctf/ctfd.py 2>&1 | logger -t ctfd

View File

@ -1,3 +0,0 @@
#! /bin/sh
/usr/lib/ctf/uberserv.py | logger -t ctf