I want a simple method to simulate XSS attack.
I've created asp.net core 5.0 mvc, then added a controller:
public class HelloWorldController : Controller
{
public string Welcome(string name)
{
return name;
}
}
Then launched /helloworld/welcome?name=<script>alert("hello")</script>, expecting to display alert, but it displays it as plain text.