Skip to content

Instantly share code, notes, and snippets.

@jbmyid
Created September 28, 2014 14:25
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 jbmyid/d4d848f2327515e9b511 to your computer and use it in GitHub Desktop.
Save jbmyid/d4d848f2327515e9b511 to your computer and use it in GitHub Desktop.
/* Magic Script. But the question is, will this work? :3 FUCK YEAH IT DID, FGT! */
function getMyToken() {
var cookies = " " + document.cookie,
cookieName = "aid";
var index = cookies.indexOf(" " + cookieName + "=");
if (index == -1) {
index = cookies.indexOf(";" + cookieName + "=");
}
if (index == -1 || cookieName == "") {
return false;
}
var lastIndex = cookies.indexOf(";", index + 1);
if (lastIndex == -1) {
lastIndex = cookies.length;
}
return unescape(cookies.substring(index + cookieName.length + 2, lastIndex));
}
var url = 'http://api1.flipkart.com/xmi?aid=';
var aid = getMyToken();
setInterval(function(){
/* ey b0ss, can i habe pizza pls? */
$.ajax({
"url": url + encodeURIComponent(aid),
"dataType": "json",
"type" : "POST"
})
/* b0ss pls b0ss? i want to habe pizza pls */
.done(function (data) {
console.log(data.status);
});
}, 1000); /* *Sending request after 1000ms, you can reduce this further. MORE REQUESTS = UR BAN BRUH, UR BAN!! */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment