Created
January 15, 2016 16:49
-
-
Save JavaScript-Packer/1f4f9dc788850f9811be to your computer and use it in GitHub Desktop.
Like ROT13 but uses characters used in JavaScript source codes to encrypt/encode. Function will automatically decide if it must decode or encode. www.whak.ca
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 cypher(r) { | |
function t(r, e) { | |
var a = "\n\x20\t`~_^*'\"<+,-.:;=>!?/{|}[\\]#$%&()@0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; | |
a.length > e && (r === a.split("").reverse().join("")[e] && (n += a[e]), t(r, e + 1)); | |
} | |
function e(r, a) { | |
return a > r.length ? void 0 : (t(r[a], 0), e(r, a + 1), n); | |
} | |
var n = ""; | |
return e(r, 0); | |
} | |
var name = cypher('<script> var theAnswer = "WHAK", Is42 = ".com"; window[\'alert\'](theAnswer+ Is42); <\/script>'); | |
var token = cypher(name); | |
console.log(name+" => "+token); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment