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
// This javascript code will alert you and immediately book the slot whenever a slot opens up on the given date within the given pincodes. | |
// **** THIS SCRIPT IS TO MAKE NEW BOOKING FOR DOSE 1 OR DOSE 2. IN CASE OF RESCHEDULE, FIRST CANCEL THE BOOKING AND THEN TRY TO BOOK USING THIS SCRIPT. **** | |
// **** RUN SCRIPT 5 MINUTES BEFORE THE SLOT OPENING TIME. IF THE SESSION IS EXPIRED (EXPIRES IN 10-15 MINUTES), LOG IN AND RERUN THE SCRIPT. **** | |
// Steps to use | |
// 1. Update pincodes,age,district_id,beneficiaries,dose,vaccine & vaccine_date. | |
// 2. Login to https://selfregistration.cowin.gov.in/ | |
// 3. Right Click on the website | |
// 4. Click on Inspect |
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
// Computes the SHA-256 digest of a string with Web Crypto | |
// Source: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest | |
function sha256(str) { | |
// Get the string as arraybuffer. | |
var buffer = new TextEncoder("utf-8").encode(str) | |
return crypto.subtle.digest("SHA-256", buffer).then(function(hash) { | |
return hex(hash) | |
}) | |
} |