Created
July 24, 2012 14:48
-
-
Save applehat/3170393 to your computer and use it in GitHub Desktop.
jQuery Ajax example for PHP-XSS
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
var request = $.ajax({ | |
url: "/url/to/your/xss.php", | |
data: {url : 'http://www.google.com/ig/api?weather=Mountain+View'}, | |
dataType: "xml" | |
}); | |
request.done(function(xml) { | |
var weather = $(xml).find("current_conditions > condition").attr('data'); | |
alert('It is '+weather+' in Mountain View'); | |
}); | |
request.fail(function(jqXHR, textStatus) { | |
alert( "Request failed: " + textStatus ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment