Skip to content

Instantly share code, notes, and snippets.

@applehat
Created July 24, 2012 14:48
Show Gist options
  • Save applehat/3170393 to your computer and use it in GitHub Desktop.
Save applehat/3170393 to your computer and use it in GitHub Desktop.
jQuery Ajax example for PHP-XSS
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