55from FlaskRTBCTF import db , bcrypt
66from FlaskRTBCTF .models import User , Score
77from FlaskRTBCTF .ctf .forms import UserHashForm , RootHashForm
8- from FlaskRTBCTF .config import ctfname , box , userHash , rootHash , userScore , rootScore
8+ from FlaskRTBCTF .config import organization , box , userHash , rootHash , userScore , rootScore
99from datetime import datetime
1010
1111ctf = Blueprint ('ctf' , __name__ )
@@ -21,7 +21,8 @@ def scoreboard():
2121 for score in scores :
2222 userNameScoreList .append ({'username' : User .query .get (score .user_id ).username ,'score' :score .points })
2323
24- return render_template ('scoreboard.html' , scores = userNameScoreList , ctfname = ctfname )
24+ return render_template ('scoreboard.html' , scores = userNameScoreList , organization = organization )
25+
2526
2627''' Machine Info '''
2728
@@ -31,7 +32,7 @@ def machine():
3132 userHashForm = UserHashForm ()
3233 rootHashForm = RootHashForm ()
3334 return render_template ('machine.html' , userHashForm = userHashForm ,
34- rootHashForm = rootHashForm , ctfname = ctfname , box = box )
35+ rootHashForm = rootHashForm , organization = organization , box = box )
3536
3637''' Hash Submission Management '''
3738
@@ -54,10 +55,10 @@ def validateRootHash():
5455 else :
5556 flash ("Sorry! Wrong system hash" , "danger" )
5657 return render_template ('machine.html' , userHashForm = userHashForm ,
57- rootHashForm = rootHashForm , ctfname = ctfname , box = box )
58+ rootHashForm = rootHashForm , organization = organization , box = box )
5859 else :
5960 return render_template ('machine.html' , userHashForm = userHashForm ,
60- rootHashForm = rootHashForm , ctfname = ctfname , box = box )
61+ rootHashForm = rootHashForm , organization = organization , box = box )
6162
6263
6364@ctf .route ("/validateUserHash" , methods = ['POST' ])
@@ -79,9 +80,9 @@ def validateUserHash():
7980 else :
8081 flash ("Sorry! Wrong user hash" , "danger" )
8182 return render_template ('machine.html' , userHashForm = userHashForm ,
82- rootHashForm = rootHashForm , ctfname = ctfname , box = box )
83+ rootHashForm = rootHashForm , organization = organization , box = box )
8384 else :
8485 return render_template ('machine.html' , userHashForm = userHashForm ,
85- rootHashForm = rootHashForm , ctfname = ctfname , box = box )
86+ rootHashForm = rootHashForm , organization = organization , box = box )
8687
8788
0 commit comments