Добрый день! Вот надкнулся я на одну страницу. И вижу такой вот код. PHP: <script language=JavaScript>eval(unescape('var%20codelock_bas%3D%27ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%2B%2F%27%3B%20function%20codelock_dec%28str%29%20%7B%20str%3Dstr.split%28%27%40%27%29.join%28%27CAg%27%29%3B%20str%3Dstr.split%28%27%21%27%29.join%28%27W5%27%29%3B%20str%3Dstr.split%28%27%2A%27%29.join%28%27CAgI%27%29%3B%20var%20bt%2C%20dt%20%3D%20%27%27%3B%20for%28i%3D0%3B%20i%3Cstr.length%3B%20i%20%2B%3D%204%29%20%7B%20bt%20%3D%20%28codelock_bas.indexOf%28str.charAt%28i%29%29%20%26%200xff%29%20%3C%3C18%20%7C%20%28codelock_bas.indexOf%28str.charAt%28i%20%2B1%29%29%20%26%200xff%29%20%3C%3C12%20%7C%20%28codelock_bas.indexOf%28str.charAt%28i%20%2B2%29%29%20%26%200xff%29%20%3C%3C%206%20%7C%20codelock_bas.indexOf%28str.charAt%28i%20%2B3%29%29%20%26%200xff%3B%20dt%20%2B%3D%20String.fromCharCode%28%28bt%20%26%200xff0000%29%20%3E%3E16%2C%20%28bt%20%26%200xff00%29%20%3E%3E8%2C%20bt%20%26%200xff%29%3B%20%7D%20if%28str.charCodeAt%28i%20-2%29%20%3D%3D%2061%29%20%7B%20return%28dt.substring%280%2C%20dt.length%20-2%29%29%3B%20%7D%20else%20if%28str.charCodeAt%28i%20-1%29%20%3D%3D%2061%29%20%7B%20return%28dt.substring%280%2C%20dt.length%20-1%29%29%3B%20%7D%20else%20%7Breturn%28dt%29%7D%3B%20%7D')); document.write(codelock_dec('I*****AkJPG9iamVjdCBpZD0iU29wUGxheWVyIiBuYW1lPSJTb3BQbGF5ZXIiIGNsYXNzaWQ9ImNsc2lkOjhGRUZGMzY0LTZBNUYtNDk2Ni1BOTE3LUEzQUMyODQxMTY1OSIgaGVpZ2h0PSIzOTAiIHdpZHRoPSI1MjAiP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P: %28%27CAg%27%29%3B%20str%3Dstr.split%28%27%21%27%29. Кто мне подскажет, што ето за кодировку и как его прочитать! Спасибо!!!
Сама функция расшифровки PHP: var codelock_bas = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 +/ '; function codelock_dec(str) { str = str.split('@').join('CAg'); str = str.split(' ! ').join('W5'); str = str.split(' * ').join('CAgI'); var bt, dt = ''; for(i = 0; i<str.length; i += 4) { bt =(codelock_bas.indexOf(str.charAt(i)) & 0xff)<<18 |(codelock_bas.indexOf(str.charAt(i + 1)) & 0xff)<<12 |(codelock_bas.indexOf(str.charAt(i + 2)) & 0xff)<< 6 | codelock_bas.indexOf(str.charAt(i + 3)) & 0xff; dt += String.fromCharCode((bt & 0xff0000)>>16, (bt & 0xff00)>>8, bt & 0xff); } if(str.charCodeAt(i - 2) == 61) { return(dt.substring(0, dt.length - 2)); } else if(str.charCodeAt(i - 1) == 61) { return(dt.substring(0, dt.length - 1)); } else { return(dt) }; } После расшифровки PHP: <object id="SopPlayer" name="SopPlayer" classid="clsid:8FEFF364-6A5F-4966-A917-A3AC28411659" height="390" width="520"> <param name="AutoStart" value="1" /> <param name="SopAddress" value="sop://211.152.36.37:3912/60349" /> <param name="ChannelName" value="Discovery World" /> </object> <script language = JavaScript> var message = "This code is protected!"; function clickIE4() { if(event.button == 2) { alert(message); return false; } } function clickNS4(e) { if(document.layers || document.getElementById &&! document.all) { if(e.which == 2 || e.which == 3) { alert(message); return false; } } } if(document.layers) { document.captureEvents(Event.MOUSEDOWN); document.onmousedown = clickNS4; } else if(document.all &&! document.getElementById) { document.onmousedown = clickIE4; } document.oncontextmenu = new Function("alert(message);return false") < /script>
Это URLEncode. Подробнее здесь: http://i-technica.com/whitestuff/urlencodechart.html Результат: PHP: <object id="SopPlayer" name="SopPlayer" classid="clsid:8FEFF364-6A5F-4966-A917-A3AC28411659" height="390" width="520"> <param name="AutoStart" value="1" /> <param name="SopAddress" value="sop://211.152.36.37:3912/60349" /> <param name="ChannelName" value="Discovery World" /> </object> <script language=JavaScript> var message="This code is protected!"; function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("alert(message);return false") </script>
Если декодировать с етим encoder , то получается так, PHP: 'var codelock_bas='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; function codelock_dec(str) { str=str.split('@').join('CAg'); str=str.split('!').join('W5'); str=str.split('*').join('CAgI'); var bt, dt = ''; for(i=0; i<str.length; i += 4) { bt = (codelock_bas.indexOf(str.charAt(i)) & 0xff) <<18 | (codelock_bas.indexOf(str.charAt(i +1)) & 0xff) <<12 | (codelock_bas.indexOf(str.charAt(i +2)) & 0xff) << 6 | codelock_bas.indexOf(str.charAt(i +3)) & 0xff; dt += String.fromCharCode((bt & 0xff0000) >>16, (bt & 0xff00) >>8, bt & 0xff); } if(str.charCodeAt(i -2) == 61) { return(dt.substring(0, dt.length -2)); } else if(str.charCodeAt(i -1) == 61) { return(dt.substring(0, dt.length -1)); } else {return(dt)}; }')); document.write(codelock_dec('I*****AkJPG9iamVjdCBpZD0iU29wUGxheWVyIiBuYW1lPSJTb3BQbGF5ZXIiIGNsYXNzaWQ9ImNsc2lkOjhGRUZGMzY0LTZBNUYtNDk2Ni1BOTE3LUEzQUMyODQxMTY1OSIgaGVpZ2h0PSIzOTAiIHdpZHRoPSI1MjAiPg0KCQk8cGFyYW0gbmFtZT0iQXV0b1N0YXJ0IiB2YWx1ZT0iMSIgLz4gDQoJCTxwYXJhbSBuYW1lPSJTb3BBZGRyZXNzIiB2YWx1ZT0ic29wOi8vMjExLjE1Mi4zNi4zNzozOTEyLzYwMzQ5IiAvPg0KCQk8cGFyYW0gbmFtZT0iQ2hhbm5lbE5hbWUiIHZhbHVlPSJEaXNjb3ZlcnkgV29ybGQiIC8 DQoJPC9vYmplY3Q DQoJCSAgI*@DQoJCSAgI*@DQo8c2NyaXB0IGxhbmd1YWdlPUphdmFTY3JpcHQ dmFyIG1lc3NhZ2U9IlRoaXMgY29kZSBpcyBwcm90ZWN0ZWQhIjsgZnVuY3Rpb24gY2xpY2tJRTQoKXsgaWYgKGV2Z!0LmJ1dHRvbj09Mil7IGFsZXJ0KG1lc3NhZ2UpOyByZXR1cm4gZmFsc2U7IH0gfSBmd!jdGlvbiBjbGlja05TNChlKXsgaWYgKGRvY3VtZ!0LmxheWVyc3x8ZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQmJiFkb2N1bWVudC5hbGwpeyBpZiAoZS53aGljaD09Mnx8ZS53aGljaD09Myl7IGFsZXJ0KG1lc3NhZ2UpOyByZXR1cm4gZmFsc2U7IH0gfSB9IGlmIChkb2N1bWVudC5sYXllcnMpeyBkb2N1bWVudC5jYXB0dXJlRXZlbnRzKEV2Z!0Lk1PVVNFRE9XTik7IGRvY3VtZ!0Lm9ubW91c2Vkb3duPWNsaWNrTlM0OyB9IGVsc2UgaWYgKGRvY3VtZ!0LmFsbCYmIWRvY3VtZ!0LmdldEVsZW1lbnRCeUlkKXsgZG9jdW1lbnQub25tb3VzZWRvd249Y2xpY2tJRTQ7IH0gZG9jdW1lbnQub25jb250ZXh0bWVudT1uZXcgRnVuY3Rpb24oImFsZXJ0KG1lc3NhZ2UpO3JldHVybiBmYWxzZSIpIDwvc2NyaXB0Pg==' Чёт я непонимаю, как вы получили вот ето! PHP: <object id="SopPlayer" name="SopPlayer" classid="clsid:8FEFF364-6A5F-4966-A917-A3AC28411659" height="390" width="520"> <param name="AutoStart" value="1" /> <param name="SopAddress" value="sop://211.152.36.37:3912/60349" /> <param name="ChannelName" value="Discovery World" /> </object> <script language = JavaScript> var message = "This code is protected!"; function clickIE4() { if(event.button == 2) { alert(message); return false; } } function clickNS4(e) { if(document.layers || document.getElementById &&! document.all) { if(e.which == 2 || e.which == 3) { alert(message); return false; } } } if(document.layers) { document.captureEvents(Event.MOUSEDOWN); document.onmousedown = clickNS4; } else if(document.all &&! document.getElementById) { document.onmousedown = clickIE4; } document.oncontextmenu = new Function("alert(message);return false") < /script> там ещо кое што декодировать надо???
URLEncode зашифрована только функция расшифровки codelock_dec. А затем при помощи нее расшифровывается остальной код. Проще всего его получить если заменить document.write на alert