Skip to content

Commit

Permalink
simplify secret_key
Browse files Browse the repository at this point in the history
  • Loading branch information
zardus committed Sep 1, 2024
1 parent e501cb2 commit 361811a
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion web-security/cmdi-ls-boss/server
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ def challenge():
"""

os.setuid(os.geteuid())
app.secret_key = open("/flag").read().strip()
app.secret_key = os.urandom(8)
app.run("challenge.localhost", int(os.environ.get("HTTP_PORT", 80)))
2 changes: 1 addition & 1 deletion web-security/cmdi-ls-pipe/server
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ def challenge():
"""

os.setuid(os.geteuid())
app.secret_key = open("/flag").read().strip()
app.secret_key = os.urandom(8)
app.run("challenge.localhost", int(os.environ.get("HTTP_PORT", 80)))
2 changes: 1 addition & 1 deletion web-security/cmdi-ls-quote/server
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ def challenge():
"""

os.setuid(os.geteuid())
app.secret_key = open("/flag").read().strip()
app.secret_key = os.urandom(8)
app.run("challenge.localhost", int(os.environ.get("HTTP_PORT", 80)))
2 changes: 1 addition & 1 deletion web-security/cmdi-ls-semicolon/server
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ def challenge():
"""

os.setuid(os.geteuid())
app.secret_key = open("/flag").read().strip()
app.secret_key = os.urandom(8)
app.run("challenge.localhost", int(os.environ.get("HTTP_PORT", 80)))
2 changes: 1 addition & 1 deletion web-security/cmdi-touch-blind/server
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ def challenge():
"""

os.setuid(os.geteuid())
app.secret_key = open("/flag").read().strip()
app.secret_key = os.urandom(8)
app.run("challenge.localhost", int(os.environ.get("HTTP_PORT", 80)))
2 changes: 1 addition & 1 deletion web-security/level-1/server
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ def challenge(path="index.html"):
except Exception as e:
flask.abort(500, requested_path + ":" + str(e))

app.secret_key = open("/flag").read().strip()
app.secret_key = os.urandom(8)
app.run("challenge.localhost", int(os.environ.get("HTTP_PORT", 80)))
2 changes: 1 addition & 1 deletion web-security/level-2/server
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ def challenge():
"""

os.setuid(os.geteuid())
app.secret_key = open("/flag").read().strip()
app.secret_key = os.urandom(8)
app.run("challenge.localhost", int(os.environ.get("HTTP_PORT", 80)))
2 changes: 1 addition & 1 deletion web-security/path-traversal-2/server
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ def challenge(path="index.html"):
except Exception as e:
flask.abort(500, requested_path + ":" + str(e))

app.secret_key = open("/flag").read().strip()
app.secret_key = os.urandom(8)
app.run("challenge.localhost", int(os.environ.get("HTTP_PORT", 80)))

0 comments on commit 361811a

Please sign in to comment.