Skip to content

Commit 0dd4083

Browse files
committed
ssti
1 parent 2d4cf36 commit 0dd4083

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

ssti/app.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from flask import Flask, render_template_string, request
2+
from jinja2 import Template
3+
4+
app = Flask(__name__)
5+
6+
@app.route('/')
7+
def index():
8+
name = request.args.get('name', 'world') # Get the 'name' query parameter, defaulting to 'world'
9+
template = Template('<h2>Hello {{ name }}!</h2>')
10+
return render_template_string(template.render(name=name))
11+
12+
if __name__ == '__main__':
13+
app.run(debug=True, host='0.0.0.0')

ssti/templates/exploit.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Exploit Result</title>
7+
</head>
8+
<body>
9+
<h1>Exploit Result</h1>
10+
<p>Your input: {{ payload }}</p>
11+
</body>
12+
</html>

ssti/templates/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Hello</title>
7+
</head>
8+
<body>
9+
<h2>Hello {{ name }}!</h2>
10+
</body>

0 commit comments

Comments
 (0)