File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed
Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 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' )
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments