简体   繁体   中英

How can I send HTML in URL?

I am learning about security and trying different hacks. I have a basic web server using flask

from flask import Flask

app = Flask(__name__)

@app.route("/<name>")
def hello_name(name):
    return f"hello {name}"

Then on my browser (tried with firefox and chrome - same results) I enter the following:

127.0.0.1:5000/<h1>test<"forward slash"h1>

or

127.0.0.1:5000/<h1>test<%2fh1>

And get: Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

Is it the browser blocking this? Next instead of h1, I want to use the script tag. But I need to get this one right first. Is it possible to send HTML in the URL?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM