logoalt Hacker News

KomoDtoday at 7:44 PM0 repliesview on HN

Fixed, no agent required. Press F12, replace [email protected], press enter.

  var email = "[email protected]";
  
  (async function async () {
      let res = await fetch("https://enlidea.com/api/v1/handshake");
      let resBody = await res.json();
  
      let msgUint8 = new TextEncoder().encode(resBody.challenge + resBody.salt);
      let hashBuffer = await window.crypto.subtle.digest("SHA-256", msgUint8);
      let hashHex = new Uint8Array(hashBuffer).toHex();
  
      let res2 = await fetch('https://enlidea.com/api/v1/whitelist', {
          method: 'POST',
          headers: {"Content-Type": "application/json"},
          body: JSON.stringify({
              email: email,
              challenge: resBody.challenge,
              proof: hashHex,
              consent: true
          })
      });
  
      console.log(await res2.json());
  }())