Skip to content

Instantly share code, notes, and snippets.

@matthewoestreich
Last active March 6, 2019 05:29
Show Gist options
  • Save matthewoestreich/41cc3a3d1f9ce945f4016c93c89683d8 to your computer and use it in GitHub Desktop.
Save matthewoestreich/41cc3a3d1f9ce945f4016c93c89683d8 to your computer and use it in GitHub Desktop.
xss.php
<?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