Skip to content
This repository was archived by the owner on May 11, 2025. It is now read-only.

Commit 8549c45

Browse files
committed
v1.0.0.1 Release
1 parent 04b0815 commit 8549c45

24 files changed

+389
-194
lines changed

Procfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
web: gunicorn --bind :$PORT run:app
2+

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
### Uber Simple CTF Management Server
2+
3+
Made with flask
4+
5+
- works on koyeb, vercel, or render.com (nearly out of the box)
6+
7+
Meant for individual users and not teams

flags.py

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
stages = { # Sample dictionary with flags and multiple hints
2+
1: {
3+
"flag": "{bit.ly/5P3CTR6R4M}",
4+
"hints": [
5+
"Blind in one eye, deaf in the other.",
6+
"Zoom in, zoom out, and you'll find what you seek.",
7+
"You have the audacity to ask for another hint, so soon?",
8+
"Spectre", # spectrogram
9+
"Linearity is a myth.", # linear in spectrogram
10+
"Look in the mirror, that's your competition.",
11+
],
12+
"notes": "It doesn't get easier, you just get better.",
13+
},
14+
2: {
15+
"flag": "{g00ddi66in65}",
16+
"hints": [
17+
"Dig a little deeper.",
18+
"Are you using Any of the right tools?",
19+
"Try browsing a little more.",
20+
"Don't find your certificate in the worth, find your worth in the certificate",
21+
"Check your CArtification at the door.",
22+
],
23+
"notes": "Meta-data is your friend.",
24+
},
25+
3: {
26+
"flag": "{Its4m34Br0w53r}",
27+
"hints": [
28+
"This might be a site for sore eyes.",
29+
"If the past could be changed, it would not exist.",
30+
"We go way back" "Secrets often lie where robots tell you not to look.",
31+
"Every locked door has a key. Every problem has a solution.",
32+
],
33+
"notes": "If the final site is not loading, refresh and wait... (or try to add alt. or a. as the subdomain of the URL)",
34+
},
35+
4: {
36+
"flag": "{FamousZebraFumbles75}",
37+
"hints": [
38+
"Disguise is always a self portrait.",
39+
"You cannot reach the right destination by walking on the wrong path",
40+
"A path is a prior interpretation of the best way to traverse a landscape.",
41+
"One new notification",
42+
"One man's trash is another man's treasure.", # recycle bin
43+
"Reduce, Reuse, Recycle",
44+
],
45+
"notes": "Some flags can unlock more than one door.",
46+
},
47+
5: {
48+
"flag": "{R3v3r5ing_i5_fun}",
49+
"hints": [
50+
"People recognize a logo, but they remember a brand.",
51+
"Freedom lies in being bold.",
52+
"Onions have layers. Ogres have layers... You get it?",
53+
"Love without attachment is light.",
54+
"Poetry is written with tears, fiction with blood, and history with invisible ink.",
55+
"Slowly, I turned bit by bit, byte by byte.",
56+
"A hidden message, plane to see, If only you could truly see.",
57+
],
58+
"notes": "Just a little more to go.",
59+
},
60+
6: {
61+
"flag": "{s0ck3t5_4r3_4m4z1ng}",
62+
"hints": [
63+
"When one door closes, opportunity comes knocking on another",
64+
"Are we speaking the same language?",
65+
"What's in a name?",
66+
"Check all the windows.",
67+
],
68+
"notes": "Nearly there!",
69+
},
70+
}

hints/__init__.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,34 @@
11
from flask import Flask
2-
# from ctf.error_handlers import register_error_handlers # Adjust the import based on your project structure
2+
3+
# import based on your project structure
4+
35

46
def create_app():
7+
print("Creating app")
58
app = Flask(
69
__name__,
710
static_folder="static",
811
static_url_path="/",
912
template_folder="templates",
1013
)
1114
app.config["SECRET_KEY"] = "CTF_K3YF0RS355i0n5!"
12-
# ensure session cookie is httponly
15+
# ensure session cookie is httponly
1316
app.config["SESSION_COOKIE_HTTPONLY"] = True
1417
# ensure session cookie is same site
1518
app.config["SESSION_COOKIE_SAMESITE"] = "Strict"
16-
app.config["REMEMBER_COOKIE_SECURE"] = True # ensure remember cookie is secure
17-
app.config["SESSION_COOKIE_SECURE"] = True # ensure session cookie is secure
18-
19+
# ensure remember cookie is secure
20+
app.config["REMEMBER_COOKIE_SECURE"] = True
21+
# ensure session cookie is secure
22+
app.config["SESSION_COOKIE_SECURE"] = True
23+
app.config["SESSION_PERMANENT"] = True
24+
app.config["PERMANENT_SESSION_LIFETIME"] = 60 # in seconds
1925
with app.app_context():
2026
from . import routes
27+
2128
app.register_blueprint(routes.bp)
22-
# register_error_handlers(app)
2329
# app.config['referrer_policy'] = 'strict-origin-when-cross-origin'
2430
return app
25-
# app = Flask(
26-
# __name__,
27-
# static_folder="static",
28-
# static_url_path="/",
29-
# template_folder="templates",
30-
# )
3131

3232

33-
# register_error_handlers(app)
3433
# app.config['referrer_policy'] = 'strict-origin-when-cross-origin'
35-
36-
from hints import routes
34+
from hints import routes # nopep8

0 commit comments

Comments
 (0)