Last active
March 6, 2019 05:29
-
-
Save matthewoestreich/41cc3a3d1f9ce945f4016c93c89683d8 to your computer and use it in GitHub Desktop.
xss.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* run in script directory: | |
* php -S 127.0.0.1:1337 | |
*/ | |
?> | |
<?php header('X-XSS-Protection: 0'); ?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>XSS Testing</title> | |
</head> | |
<body> | |
<div> | |
<form> | |
<textarea name="xss"> | |
<?=htmlspecialchars($_GET['xss'], ENT_QUOTES, 'UTF-8')?> | |
</textarea> | |
<hr /> | |
<input type='submit' value='XSS'> | |
</form> | |
</div> | |
<div> | |
<?php | |
echo $_GET['xss']; | |
?> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment