Created
March 9, 2021 13:11
-
-
Save Hemant-Mann/2bbbea1a881295a50bcbf46a67887dc0 to your computer and use it in GitHub Desktop.
Cloudflare email decoder
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
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