Created
May 22, 2024 07:29
-
-
Save qFamouse/26d46d95e0ad1831cc5d8ab4497cc571 to your computer and use it in GitHub Desktop.
Kaspersky Key Subscriber
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
let xsrf_token = "YourXsrfTokenHere"; | |
let keys = [ | |
"ListOfYourKeys", | |
] | |
for (const key of keys) { | |
let response = await addKey(xsrf_token, key); | |
if (response.ok) { | |
console.log(`${key} - OK`) | |
} | |
else { | |
let error = await response.text(); | |
console.log(error) | |
console.log(`${key} - ERROR ${JSON.parse(error)["ErrorMessage"]}`) | |
} | |
await sleep(5000) | |
} | |
async function addKey(xsrf_token, key) { | |
return await fetch("https://my.kaspersky.com/ActivationCode/AddActivationCode", { | |
"headers": { | |
"accept": "application/json, text/plain, */*", | |
"accept-language": "ru,en;q=0.9", | |
"content-type": "application/json", | |
"x-requested-with": "XMLHttpRequest", | |
"x-xsrf-token": xsrf_token | |
}, | |
"referrer": "https://my.kaspersky.com/MyLicenses", | |
"referrerPolicy": "strict-origin-when-cross-origin", | |
"body": `{\"activationCode\":\"${key}\",\"deviceId\":null,\"serviceId\":null,\"processDeanonymization\":false,\"anonymousUserId\":null}`, | |
"method": "POST", | |
"mode": "cors", | |
"credentials": "include" | |
}); | |
} | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment