You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 11, 2025. It is now read-only.
"You have completed all the stages. Congratulations!", "success", )
87
-
returnrender_template(
88
-
"error.html", #not really an error, but a message
89
-
title="Congratulations!",
90
-
message="You have completed all the stages of the CTF. ",
91
-
),200
92
-
# if the user has completed all the stages, then flash a message
91
+
return (
92
+
render_template(
93
+
"error.html", # not really an error, but a message
94
+
title="Congratulations!",
95
+
message="You have completed all the stages of the CTF. ",
96
+
),
97
+
200,
98
+
)
99
+
# if the user has completed all the stages, then
100
+
# flash a message
93
101
break
94
102
# after going through all stages, flag isn't there
95
103
ifnotfound:
@@ -109,17 +117,19 @@ def flags():
109
117
flash(
110
118
"Exhausted all hints for this stage :( Try harder!", "warning")
111
119
# hide the button till they get to next stage
112
-
session["hint_index"] =hint_index# update the hint index
113
-
hints=stages[current_stage]["hints"][:hint_index] # get the hints based on the hint index
114
-
notes=stages[current_stage].get("notes") # get the notes if they exist
120
+
session["hint_index"] =hint_index# update the hint index
121
+
hints=stages[current_stage]["hints"][
122
+
:hint_index
123
+
] # get the hints based on the hint index
124
+
notes=stages[current_stage].get("notes") # get the notes if they exist
115
125
returnrender_template(
116
126
"flags.html",
117
127
title=f"CTFlask - Stage {current_stage}",
118
128
stage=current_stage,
119
-
hints=hints, # hints to display
120
-
hint_index=hint_index, # current hint index
121
-
submitted_flags=submitted_flags,
122
-
num_hints=len(stages[current_stage]["hints"]), # total number of hints
129
+
hints=hints, # hints to display
130
+
hint_index=hint_index, # current hint index
131
+
submitted_flags=submitted_flags,
132
+
num_hints=len(stages[current_stage]["hints"]), # total number of hints
123
133
notes=notes,
124
134
)
125
135
@@ -138,7 +148,7 @@ def index():
138
148
session["hint_index"] =0
139
149
if"token"notinsession:
140
150
session["token"] =str(uuid.uuid4()) # generate a random token
141
-
151
+
142
152
flash("Welcome to the CTF, please read the following:", "info")
143
153
brief="""
144
154
Using this site is not required to solve the CTF challenge and is not a part of the CTF challenge itself, but a tool to help you keep track of your progress. You need to find the flags on your own and not via this site itself. Good luck!
@@ -188,4 +198,4 @@ def inject_stuff():
188
198
"""
189
199
used for the footer to display the current year, version
0 commit comments