Created
June 29, 2016 16:52
-
-
Save anonymous/b5a1e5aecfd040803f40e9212253bcb0 to your computer and use it in GitHub Desktop.
Dieser Code kann als Bookmarklet gespeichert werden oder direkt in die Browser-Konsole kopiert werden, um die verschleierten Texte auf Spiegel-Online lesbar zu machen.
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
/*by cXcross and the Spon-js-hoschies*/ | |
/*29.06.2016*/ | |
(function(){ | |
function replaceTextContent(elem) | |
{ | |
$(elem).contents() | |
.filter(function () | |
{ | |
return this.nodeType === 3; | |
}) | |
.replaceWith(function () | |
{ | |
var obfuscatedText = this.data; | |
var deobfuscatedText = ""; | |
for (var i = 0; i < obfuscatedText.length; i++) | |
{ | |
var charValue = obfuscatedText.charCodeAt(i); | |
if (charValue == 177) | |
{ | |
deobfuscatedText += '&'; | |
} | |
else if (charValue == 178) | |
{ | |
deobfuscatedText += '!'; | |
} | |
else if (charValue == 180) | |
{ | |
deobfuscatedText += ';'; | |
} | |
else if (charValue == 181) | |
{ | |
deobfuscatedText += '='; | |
} | |
else if (charValue == 32) | |
{ | |
deobfuscatedText += ' '; | |
} | |
else if (charValue > 33) | |
{ | |
deobfuscatedText += String.fromCharCode(charValue - 1); | |
} | |
} | |
return deobfuscatedText; | |
}) | |
.end() | |
.filter(function () | |
{ | |
return this.nodeType === 1 | |
&& !$(this).hasClass("text-link-int") | |
&& !$(this).hasClass("text-link-ext") | |
&& !$(this).hasClass("lp-text-link-int") | |
&& !$(this).hasClass("lp-text-link-ext") | |
&& !$(this).hasClass("spCelink"); | |
}) | |
.each(function () | |
{ | |
replaceTextContent(this); | |
}); | |
} | |
function deobfuscateText() | |
{ | |
$('p.obfuscated').each(function (index, elem) | |
{ | |
replaceTextContent(elem); | |
$(elem).removeClass("obfuscated").addClass("deobfuscated"); | |
}); | |
$('div.obfuscated-content').each(function (index, elem) | |
{ | |
$(elem).removeClass("obfuscated-content").addClass("deobfuscated-content"); | |
}); | |
} | |
deobfuscateText(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment