Skip to content

Instantly share code, notes, and snippets.

@limdauto
Created August 18, 2013 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save limdauto/6261334 to your computer and use it in GitHub Desktop.
Save limdauto/6261334 to your computer and use it in GitHub Desktop.
<?php
// credit http://onwebdevelopment.blogspot.com/2008/08/xss-cross-site-scrpting-and-stealing.html
// XSS URL: xsss.php?name=%3Cscript%3Ewindow.onload=function(){alert(document.forms[0].password);}%3C/script%3E
// saved passwords will be accessed through document.forms[0].password
// and can easily be sent to the attackers via AJAX
echo $_GET['name'];
?>
<form action="login.php">
<input type="text" name="username" />
<input type="password" name="password" />
<input type="submit" value="Login" />
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment