Помогите расшифровать

Discussion in 'PHP' started by Луна, 24 May 2012.

  1. Луна

    Луна New Member

    Joined:
    19 May 2012
    Messages:
    42
    Likes Received:
    2
    Reputations:
    0
    Встретил дор, очень интересный и в нем попался такой код
    PHP:

    <script type="text/javascript" charset="utf-8">
    var 
    _0x2d78=["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","","charCodeAt","charAt","_keyStr","length","replace","indexOf","fromCharCode","\n"];var Base64={_keyStr:_0x2d78[0],encode:function(a){var b=_0x2d78[1];var c,d,e,f,g,h,i;var j=0;a=Base64._utf8_encode(a);while(j<a[_0x2d78[5]]){c=a[_0x2d78[2]](j++);d=a[_0x2d78[2]](j++);e=a[_0x2d78[2]](j++);f=c>>2;g=(c&3)<<4|d>>4;h=(d&15)<<2|e>>6;i=e&63;if(isNaN(d)){h=i=64}else{if(isNaN(e)){i=64}}b=b+this[_0x2d78[4]][_0x2d78[3]](f)+this[_0x2d78[4]][_0x2d78[3]](g)+this[_0x2d78[4]][_0x2d78[3]](h)+this[_0x2d78[4]][_0x2d78[3]](i)}return b},decode:function(a){var b=_0x2d78[1];var c,d,e;var f,g,h,i;var j=0;a=a[_0x2d78[6]](/[^A-Za-z0-9\+\/\=]/g,_0x2d78[1]);while(j<a[_0x2d78[5]]){f=this[_0x2d78[4]][_0x2d78[7]](a[_0x2d78[3]](j++));g=this[_0x2d78[4]][_0x2d78[7]](a[_0x2d78[3]](j++));h=this[_0x2d78[4]][_0x2d78[7]](a[_0x2d78[3]](j++));i=this[_0x2d78[4]][_0x2d78[7]](a[_0x2d78[3]](j++));c=f<<2|g>>4;d=(g&15)<<4|h>>2;e=(h&3)<<6|i;b=b+String[_0x2d78[8]](c);if(h!=64){b=b+String[_0x2d78[8]](d)}if(i!=64){b=b+String[_0x2d78[8]](e)}}b=Base64._utf8_decode(b);return b},_utf8_encode:function(a){a=a[_0x2d78[6]](/\r\n/g,_0x2d78[9]);var b=_0x2d78[1];for(var c=0;c<a[_0x2d78[5]];c++){var d=a[_0x2d78[2]](c);if(d<128){b+=String[_0x2d78[8]](d)}else{if(d>127&&d<2048){b+=String[_0x2d78[8]](d>>6|192);b+=String[_0x2d78[8]](d&63|128)}else{b+=String[_0x2d78[8]](d>>12|224);b+=String[_0x2d78[8]](d>>6&63|128);b+=String[_0x2d78[8]](d&63|128)}}}return b},_utf8_decode:function(a){var b=_0x2d78[1];var c=0;var d=c1=c2=0;while(c<a[_0x2d78[5]]){d=a[_0x2d78[2]](c);if(d<128){b+=String[_0x2d78[8]](d);c++}else{if(d>191&&d<224){c2=a[_0x2d78[2]](c+1);b+=String[_0x2d78[8]]((d&31)<<6|c2&63);c+=2}else{c2=a[_0x2d78[2]](c+1);c3=a[_0x2d78[2]](c+2);b+=String[_0x2d78[8]]((d&15)<<12|(c2&63)<<6|c3&63);c+=3}}}return b}}
    </script>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" charset="utf-8">$(document).ready(function(){$(document).bind("contextmenu",function(e){return false;});});</script>
    Что это может значить? Как привести код в порядок?
     
  2. Kaimi

    Kaimi Well-Known Member

    Joined:
    23 Aug 2007
    Messages:
    1,732
    Likes Received:
    809
    Reputations:
    230
    Функции для кодирования/декодирования в base64 и utf8 действительно настолько интересны?
     
    _________________________
  3. Луна

    Луна New Member

    Joined:
    19 May 2012
    Messages:
    42
    Likes Received:
    2
    Reputations:
    0
    Я же написал, дор интересный и я не понял что за код.
     
Loading...