Vulnerable-Web-Application/XSS/XSS_level5.php

29 lines
795 B
PHP
Raw Normal View History

2018-11-28 18:25:41 +00:00
<!DOCTYPE html>
<html>
<head>
<title>XSS 5</title>
2018-11-29 16:59:38 +00:00
<link rel="shortcut icon" href="../Resources/hmbct.png" />
2018-11-28 18:25:41 +00:00
</head>
<body>
2018-11-29 23:45:56 +00:00
<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">
2018-11-28 18:25:41 +00:00
<form method="GET" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="form">
<p>Your name:<input type="text" name="username"></p>
2018-11-29 23:34:30 +00:00
<input type="submit" name="submit" value="Submit">
2018-11-28 18:25:41 +00:00
</form>
2018-11-29 23:45:56 +00:00
</div>
2018-11-28 18:25:41 +00:00
<?php
if (isset($_GET["username"])) {
$user = str_replace("<", "", $_GET["username"]);
echo "Your name is "."$user";
2018-11-28 18:25:41 +00:00
}
?>
</body>
</html>