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
var evil_eval = (!+[] + [])[!+[] + !+[] + !+[]] + "v" + (!1 + [])[+!+[]] + (!1 + [])[!+[] + !+[]]; | |
function test() { | |
alert("WHAK.com"); | |
} | |
this[evil_eval](test()); |
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() { | |
"Notification" in window ? "granted" === Notification.permission ? new Notification("Hi there from WHAK.com!") :"denied" !== Notification.permission && Notification.requestPermission(function(permission) { | |
"granted" === permission && new Notification("Hi there from WHAK.com!"); | |
}) :alert("no"); | |
}(); |
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
var www = {}; www.WHAK = {}; | |
www.WHAK.ca = "http://www.whak.ca"; | |
www.WHAK.com = function(){ return "http://www.whak.com"; }(); | |
www.WHAK.us = function(x){ return x} | |
console.log(www.WHAK.us("http://www.whak.us")); | |
console.log(www.WHAK.com); | |
console.log(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
<input type="button" value="Hex Escape" onclick="alert(escape('A test!').replace(/%/g,'\\x'));"> | |
<input type="button" value="Hex unEscape" onclick="alert(unescape('A\\x20test\\x21'.replace(/\\x/g,'%')));"> |
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); |
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
var toCharCode = function(x) { | |
var o, e = x.split(""), t = []; | |
for (o in e) t.push(e[o].charCodeAt(0)); | |
return t; | |
}; | |
var unCharCode = function(x) { | |
return this["eval"]("String.fromCharCode(" + x + ")"); | |
}; |
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 swap_str(e, r, t) {//function to swap 2 sets of strings with each other | |
return e = e.split(r).join("WHAK_a_SWAP"), e = e.split(t).join("WHAK_b_SWAP"), e = e.split("WHAK_a_SWAP").join(t), | |
e = e.split("WHAK_b_SWAP").join(r); | |
} | |
//test 1 | |
var str = 'this is "test" of a \'test\' of swapping strings'; | |
var manipulated = swap_str(str,"'",'"'); | |
document.writeln(manipulated) | |
//test 2 | |
manipulated = swap_str(manipulated,"'",'"'); |
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 en(c) { | |
var x = "charCodeAt", b, e = {}, f = c.split(""), d = [], a = f[0], g = 256; | |
for (b = 1; b < f.length; b++) c = f[b], null != e[a + c] ? a += c :(d.push(1 < a.length ? e[a] :a[x](0)), | |
e[a + c] = g, g++, a = c); | |
d.push(1 < a.length ? e[a] :a[x](0)); | |
for (b = 0; b < d.length; b++) d[b] = String.fromCharCode(d[b]); | |
return d.join(""); | |
} | |
function de(b) { |
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 parseBetween(s, b, b2, j) { | |
var x = []; | |
var a = s.split(b); | |
for (var i = 1; i < a.length; i++) if (true == function(z) { | |
return z % 2; | |
}(i)) x.push(a[i].split(b2)); | |
if ("" == j) return x; else return x.join(j); | |
} | |
var str = 'hello, my website is "www.WHAK.ca", my friend\'s site is "www.BibleHunter.com". what\'s yours?'; | |
document.writeln(parseBetween(str, '"', '"', "<hr>")); |
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 kleen(e, r) { | |
r = "replace"; | |
return e[r](/\\/g, "\\\\")[r](/\r/gm, "\n")[r](/\n{2,}/gm, "\n")[r](/\n/g, "\\n")[r](/\'/g, "\\'"[r](/\"/g, '\\"')); | |
} |