This is a simple program that allows you to choose the background color of a webpage. For instance, type in red, purple, or green. You will be greeted with a page that displays the color of your choice.
Now, instead of just entering a color, let's try something like:
tag, making the page do something the author didn't intend.
You can play around with various ideas. For instance you can replace
, then try to click the link. There is a lot that can be tried here. Maybe even something like:
The below program is the same as the one above, however it sanitizes the user input so it doesn't allow Scripting Injection. If you try to inject any code, the code won't run.