Skip to content

Instantly share code, notes, and snippets.

@tfountain
Created June 21, 2012 17:59
Show Gist options
  • Save tfountain/2967375 to your computer and use it in GitHub Desktop.
Save tfountain/2967375 to your computer and use it in GitHub Desktop.
XSS
<html>
<head>
<title>Test</title>
</head>
<body>
<form method="get" action="">
<?php
$data = "' onmouseover='alert(document.cookie);' foo=' ";
echo "<input type='hidden' value='" . htmlspecialchars($data) . "' />\n";
?>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment