Skip to content

Instantly share code, notes, and snippets.

@Hemant-Mann
Created March 9, 2021 13:11
Show Gist options
  • Save Hemant-Mann/2bbbea1a881295a50bcbf46a67887dc0 to your computer and use it in GitHub Desktop.
Save Hemant-Mann/2bbbea1a881295a50bcbf46a67887dc0 to your computer and use it in GitHub Desktop.
Cloudflare email decoder
function cfDecodeEmail(encodedString) {
var email = "", r = parseInt(encodedString.substr(0, 2), 16), n, i;
for (n = 2; encodedString.length - n; n += 2){
i = parseInt(encodedString.substr(n, 2), 16) ^ r;
email += String.fromCharCode(i);
}
return email;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment