mirror of https://github.com/dirtbags/moth.git
Add keys for posters, ctfd now generates flagger tokens
This commit is contained in:
parent
43a4ff2d59
commit
36daf80cf7
18
ctfd.py
18
ctfd.py
|
@ -1,13 +1,13 @@
|
|||
#! /usr/bin/env python3
|
||||
|
||||
import asyncore
|
||||
import pointsd
|
||||
import game
|
||||
import flagd
|
||||
import histogram
|
||||
import config
|
||||
import os
|
||||
import sys
|
||||
import optparse
|
||||
from ctf import pointsd
|
||||
from ctf import flagd
|
||||
from ctf import histogram
|
||||
from ctf import config
|
||||
|
||||
do_reap = False
|
||||
|
||||
|
@ -27,6 +27,14 @@ def sigchld(signum, frame):
|
|||
do_reap = True
|
||||
|
||||
def main():
|
||||
p = optparse.OptionParser()
|
||||
p.add_option('-p', '--genpass', dest='cat', default=None,
|
||||
help='Generate a flagger password for the given category')
|
||||
opts, args = p.parse_args()
|
||||
if opts.cat:
|
||||
print('%s:::%s' % (opts.cat, flagd.hexdigest(opts.cat.encode('utf-8'))))
|
||||
return
|
||||
|
||||
pointsrv = pointsd.start()
|
||||
flagsrv = flagd.start()
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ class Kevin(irc.Bot):
|
|||
def cmd_PRIVMSG(self, sender, forum, addl):
|
||||
text = addl[0]
|
||||
if text.startswith('!'):
|
||||
parts = text[1:].lower().split(' ', 1)
|
||||
cmd = parts[0]
|
||||
parts = text[1:].split(' ', 1)
|
||||
cmd = parts[0].lower()
|
||||
if len(parts) > 1:
|
||||
args = parts[1]
|
||||
else:
|
||||
|
|
|
@ -1 +1 @@
|
|||
|
||||
You're well on your way :)
|
||||
|
|
|
@ -1 +1 @@
|
|||
|
||||
-462766
|
||||
|
|
|
@ -1 +1 @@
|
|||
|
||||
3acd767f2717b84076cdcd18e882f01d
|
||||
|
|
Loading…
Reference in New Issue