Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
loeasy68
GitHub Repository: loeasy68/loeasy68.github.io
Path: blob/main/website/Python-Projects/Python-docker/script.py
2937 views
1
from flask import Flask, redirect, url_for
2
import requests
3
4
app = Flask(__name__)
5
6
@app.route("/")
7
def home():
8
return f"""
9
<h1>LoGoat</h1>
10
<p>A highly inscure web application</p>
11
<a href="{url_for("xss")}">Cross Site scripting</a>
12
"""
13
14
@app.route("/xss")
15
def xss():
16
return """
17
18
"""
19
20
@app.route("/<name>")
21
def user(name):
22
return f"Hello {name}!"
23
24
@app.route("/admin")
25
def admin():
26
return redirect(url_for("home"))
27
28
if __name__ = "__main__":
29
app.run()
30