30 lines
		
	
	
		
			732 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			732 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <html>
 | |
| <head>
 | |
| 	<title>XSS 4</title>
 | |
| </head>
 | |
| <body>
 | |
| 	
 | |
| 	 <div style="background-color:#c9c9c9;padding:15px;">
 | |
|       <button type="button" name="homeButton" onclick="location.href='../homepage.html';">Home Page</button>
 | |
|       <button type="button" name="mainButton" onclick="location.href='xssmainpage.html';">Main Page</button>
 | |
|     </div>
 | |
| <div align="center">
 | |
| <form method="GET" action="" name="form">
 | |
|    <p>Your name:<input type="text" name="username"></p>
 | |
|    <input type="submit" name="submit" value="Submit">
 | |
| </form>
 | |
| 	</div>
 | |
| <?php 
 | |
| if (isset($_GET["username"])) {
 | |
|     $values = array("script", "prompt", "alert", "h1");
 | |
| 
 | |
|  	$user = str_replace($values, " ",$_GET["username"]);
 | |
| 	echo "$user";
 | |
| }
 | |
| 
 | |
|  ?>
 | |
| 
 | |
| </body>
 | |
| </html>
 | 
