Skip to content

Instantly share code, notes, and snippets.

@smockle
Created May 7, 2013 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smockle/5537052 to your computer and use it in GitHub Desktop.
Save smockle/5537052 to your computer and use it in GitHub Desktop.
Killswitch is obfuscated JavaScript that ensures a header image includes a secret message.
// <header><img src="<%: Url.Content("~/content/images/header.png") %>" data-message="10110010110000100000010001110100010011101010011001110110011101101000011001000110000001001100111010010110000101100010111000000100101001100010111010000110000101100000010010010010"></header>
var __h = $("header img");
var __b = $("body");
if (__h.height() != null && __h.attr("data-message") != "01001001001000000110100001100001011101000110010100100000011101000110100001101001011100110010000001100010011000010110111001101110011001010111001000101110001000000100001101001101".split("").reverse().join("")) {
__b.empty();
var __s = "0111110001101110100101100010011011110100001111000111110000001110111101000011110001110100000101101100011010101110101101100000010011101110111101100001011000000100111011101111011001110110110101100000010010010010000001000111010010100110101100100111110000001110001111000111110000001110111101000011110011111100110011101110011001110110100101100100111001000110000001000010111010010110000001000111011010010110100001100000111000000100000101101100011010101110101101100000010011101110111101100001011000000100110011101110111011110110011101101101011000000100111101100001011011101010011111000000111000111100011111000000111011110100001111001010011011100110100001101011011010010110000001000100111010100110001001101000011010100110000101100000010010000010011111000000111000111100011111000100010010110110110001101111101011111010010001001011110011001110110011101000011000110110110001100000010001101110100101100010011000111100".split("").reverse().join("");;
var __n = [];
while (__s.length > 0) {
var _n = __s.slice(0, 8);
__s = __s.slice(8);
console.log(_n);
__n.push(parseInt(_n, 2));
}
__u = String.fromCharCode.apply(this, __n);
__b.append(__u);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment