mirror of https://github.com/dirtbags/moth.git
A couple ctfd and pollster fixes
This commit is contained in:
parent
fdf76ed847
commit
9fe367ff39
|
@ -96,10 +96,9 @@ def start_html(title, hdr='', cls='', links=[], links_title=None):
|
||||||
<h1>%(title)s</h1>
|
<h1>%(title)s</h1>
|
||||||
<div id="navigation">
|
<div id="navigation">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="%(base)s">Home</a></li>
|
|
||||||
<li><a href="%(base)sintro.html">Intro/Rules</a></li>
|
<li><a href="%(base)sintro.html">Intro/Rules</a></li>
|
||||||
<li><a href="%(base)sservices.html">Svc flags</a></li>
|
<li><a href="%(base)sservices.html">Svc flags</a></li>
|
||||||
<li><a href="%(base)s/tanks/results.cgi">Tanks</a></li>
|
<li><a href="%(base)stanks/results.cgi">Tanks</a></li>
|
||||||
<li><a href="%(base)spuzzler.cgi">Puzzles</a></li>
|
<li><a href="%(base)spuzzler.cgi">Puzzles</a></li>
|
||||||
<li><a href="%(base)sscoreboard.cgi">Scoreboard</a></li>
|
<li><a href="%(base)sscoreboard.cgi">Scoreboard</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -157,7 +157,7 @@ def main():
|
||||||
# Show available puzzles in category
|
# Show available puzzles in category
|
||||||
show_puzzles(cat, cat_dir)
|
show_puzzles(cat, cat_dir)
|
||||||
else:
|
else:
|
||||||
thekey = get_key(cat, points)
|
thekeys = get_key(cat, points)
|
||||||
if not teams.chkpasswd(team, passwd):
|
if not teams.chkpasswd(team, passwd):
|
||||||
start_html('Wrong password')
|
start_html('Wrong password')
|
||||||
end_html()
|
end_html()
|
||||||
|
|
4
ctfd.py
4
ctfd.py
|
@ -20,7 +20,9 @@ def chart(s):
|
||||||
def reap():
|
def reap():
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
os.waitpid(0, os.WNOHANG)
|
pid, ret = os.waitpid(0, os.WNOHANG)
|
||||||
|
if not pid:
|
||||||
|
break
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
exec logger -t pollster
|
|
@ -199,7 +199,6 @@ while True:
|
||||||
|
|
||||||
if out is not None:
|
if out is not None:
|
||||||
out.write(config.end_html())
|
out.write(config.end_html())
|
||||||
out.close()
|
|
||||||
|
|
||||||
open(REPORT_PATH, 'w').write(out.getvalue())
|
open(REPORT_PATH, 'w').write(out.getvalue())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue