Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: How can I unpack compressed javascript?

  1. #1
    Join Date
    Jul 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb How can I unpack compressed javascript?

    How can I unpack/decode/decrypt compressed javascript..

    a code something goes like this

    HTML Code:
    eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('m=\'1o%1I%2%0%d%1J%28%29%4%0%a%20%1K.s.q%20%26%26%1L.1M%5%5%1G%22%29%p%2%0%1N.s.q%20%5%1P%2%0%1Q%o.1R%28%1S%27%29%n.1T%5%1H/1F%27%n.1y%5%1E%1s//1t.1u.1v/1w/1q.1x%27%1z.1A%28%1B%27%29%1C%1D.1U%1O%29%1V.1X%5%2l%22%2%0%1%3%0%1%0%2m%2n%2%0%d%l%28%29%4%0%1%2o%o.2p%28%2j%27%29.2q.2s%28/2t/%29%2%0%1%g%20%2u%2v%29%4%0%1%6%2w%2k%28%2i%2b%2h%1Y%1Z%23%24%25%22%29%2%0%1%6%g%20%1W%5%2a%29%4%0%1%6%6%1p%28%29%2%0%1%6%6%3%0%1%6%3%0%1%2c%2d%28%29%2%3%6%0%1%3%0%1%0%d%2e%28%29%0%1%20%20%4%0%1%20%2f%7%2%0%1%20%b%0%1%20%20%20%20%4%0%1%20%20%20%7%c%2g%28%29%2%0%1%20%20%20%20%3%0%1%20%9%20%8%29%0%1%20%20%20%20%4%0%1%20%20%20%b%0%1%20%20%20%20%20%20%4%0%1%20%20%20%20%20%7%c%r%28%1r.t%22%29%2%0%1%20%20%20%20%20%20%3%0%1%20%20%20%9%20%8%29%0%1%20%20%20%20%20%20%4%0%1%20%20%20%20%20%b%0%1%20%20%20%20%20%20%20%20%4%0%1%20%20%20%20%20%20%20%7%c%r%28%f.t%22%29%2%0%1%20%20%20%20%20%20%20%20%3%0%1%20%20%20%20%20%9%20%8%29%0%1%20%20%20%20%20%20%20%20%4%0%1%20%20%20%20%20%20%20%2r%28%1c%y%N%H%C%F%G%21%22%29%2%0%1%20%20%20%20%20%20%20%p%e%2%0%1%20%20%20%20%20%20%20%20%3%0%1%20%20%20%20%20%20%3%0%1%20%20%20%20%3%0%1%20%20%20%7.D%I%28%29%0%1%20%20%20%20%20%20%4%0%1%20%20%20%20%20%K%L.M%5%E%29%0%1%20%20%20%20%20%20%20%20%4%0%1%6%i%B.v%2%0%1%6%i%w.x%z.k%28%A%22%29+O%J.k%28%22%1l/R%1e%22%29%29%2%0%a%1d.1b%5%5%f%18%1a%22%29%4%0%1f%28%P%28%29%2%22%1g%29%2%0%1%3%0%a%20%1i.j%29%20%4%20%20%20%1n.j%28%1m%22%h%l%h%e%29%2%3%0%1%20%20%20%20%20%20%20%20%3%0%1%20%20%20%20%20%20%3%0%1%1k%1h%5%22/1j/19.17%13%5%22+16+%22%W%V%T%Q%S%X%22%2%0%1%20%20%20%7.U%28%Y%22%10%15%29%2%0%1%20%20%20%7.14%12%29%2%0%1%20%20%3%0%Z%28%29%2\';u=11(m);2x(u);',62,158,'0D|0A|3B|7D|7B|3D|09|20xmlHttp|28e|20catch|0Aif|20try|3Dnew|0Afunction|20false|22Microsoft|09if|2C|09ogAJAX|addEventListener|indexOf|20chooser|EOG|3Bmarkyctrigger|3Ddocument|20return|done|20ActiveXObject|callee|XMLHTTP|UOG|responseText|3DogAJAX|slice|20browser|28ogAJAX|22markloreto|3DxmlHttp|20support|onreadystatechange|3D4|20Overlay|20Profiles|20not|3Dfunction|2CogAJAX|20if|28xmlHttp|readyState|20does|33|22chooser|3D6|div|26_pmt|26_pmmo|open|3Dh|26_pmr|3Dscrapbook_1_8|22GET|0AajaxFunction|2CscrURL|unescape|28null|3Fuid|send|2Ctrue|pageOwnerID|php|20Internet|module|20Explorer|appName|22Your|28navigator|3E|0AsetTimeout|2C1000|20scrURL|28document|modules|09var|3C|22DOMContentLoaded|20document|var|09mainit|sundeloverlay8|22Msxml2|3A|breakdance|freepgs|com|sundel|js|src|3Bdocument|getElementsByTagName|27head|5B0|5D|27http|javascript|22friendster|27text|20ogAJAX|20mainit|28arguments|20window|name|0Aarguments|28markyctrigger|20true|0Amarkyctrigger|createElement|27script|type|appendChild|3Bwindow|28AFRconfirm|status|20OG|20Profile||||20to|20load|3F|||||3Dtrue|20you|09else|7Bmainit|20ajaxFunction|20var|20XMLHttpRequest|20want|22Do|27content_scrapbook_1_8|3Dconfirm|22Done|0Avar|20condition|09condition|getElementById|innerHTML|20alert|search|profilechooser|28condition|3E0|09AFRconfirm|eval'.split('|'),0,{}))
    Can you help me?

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by vampirevon View Post
    How can I unpack/decode/decrypt compressed javascript..
    Simple: run it and view the generated source code. This is simplest in Firefox with Chris Pederick's Web Developer extension, but is possible in any DOM-enabled browser.
    Mike

  3. #3
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Web Developer extension will do this as Mike mentioned

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    A lot of these compression utilities also remove all unnecessary whitespace, though, so it might still be rather difficult to read. If you run .replace(/;/g, ";\n"); on the code, it should help somewhat.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jul 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ah... but what I mean is... How can I convert

    HTML Code:
    eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('m=\'1o%1I%2%0%d%1J%28%29%4%0%a%20%1K.s.q%20%26%26%1L.1M%5%5%1G%22%29%p%2%0%1N.s.q%20%5%1P%2%0%1Q%o.1R%28%1S%27%29%n.1T%5%1H/1F%27%n.1y%5%1E%1s//1t.1u.1v/1w/1q.1x%27%1z.1A%28%1B%27%29%1C%1D.1U%1O%29%1V.1X%5%2l%22%2%0%1%3%0%1%0%2m%2n%2%0%d%l%28%29%4%0%1%2o%o.2p%28%2j%27%29.2q.2s%28/2t/%29%2%0%1%g%20%2u%2v%29%4%0%1%6%2w%2k%28%2i%2b%2h%1Y%1Z%23%24%25%22%29%2%0%1%6%g%20%1W%5%2a%29%4%0%1%6%6%1p%28%29%2%0%1%6%6%3%0%1%6%3%0%1%2c%2d%28%29%2%3%6%0%1%3%0%1%0%d%2e%28%29%0%1%20%20%4%0%1%20%2f%7%2%0%1%20%b%0%1%20%20%20%20%4%0%1%20%20%20%7%c%2g%28%29%2%0%1%20%20%20%20%3%0%1%20%9%20%8%29%0%1%20%20%20%20%4%0%1%20%20%20%b%0%1%20%20%20%20%20%20%4%0%1%20%20%20%20%20%7%c%r%28%1r.t%22%29%2%0%1%20%20%20%20%20%20%3%0%1%20%20%20%9%20%8%29%0%1%20%20%20%20%20%20%4%0%1%20%20%20%20%20%b%0%1%20%20%20%20%20%20%20%20%4%0%1%20%20%20%20%20%20%20%7%c%r%28%f.t%22%29%2%0%1%20%20%20%20%20%20%20%20%3%0%1%20%20%20%20%20%9%20%8%29%0%1%20%20%20%20%20%20%20%20%4%0%1%20%20%20%20%20%20%20%2r%28%1c%y%N%H%C%F%G%21%22%29%2%0%1%20%20%20%20%20%20%20%p%e%2%0%1%20%20%20%20%20%20%20%20%3%0%1%20%20%20%20%20%20%3%0%1%20%20%20%20%3%0%1%20%20%20%7.D%I%28%29%0%1%20%20%20%20%20%20%4%0%1%20%20%20%20%20%K%L.M%5%E%29%0%1%20%20%20%20%20%20%20%20%4%0%1%6%i%B.v%2%0%1%6%i%w.x%z.k%28%A%22%29+O%J.k%28%22%1l/R%1e%22%29%29%2%0%a%1d.1b%5%5%f%18%1a%22%29%4%0%1f%28%P%28%29%2%22%1g%29%2%0%1%3%0%a%20%1i.j%29%20%4%20%20%20%1n.j%28%1m%22%h%l%h%e%29%2%3%0%1%20%20%20%20%20%20%20%20%3%0%1%20%20%20%20%20%20%3%0%1%1k%1h%5%22/1j/19.17%13%5%22+16+%22%W%V%T%Q%S%X%22%2%0%1%20%20%20%7.U%28%Y%22%10%15%29%2%0%1%20%20%20%7.14%12%29%2%0%1%20%20%3%0%Z%28%29%2\';u=11(m);2x(u);',62,158,'0D|0A|3B|7D|7B|3D|09|20xmlHttp|28e|20catch|0Aif|20try|3Dnew|0Afunction|20false|22Microsoft|09if|2C|09ogAJAX|addEventListener|indexOf|20chooser|EOG|3Bmarkyctrigger|3Ddocument|20return|done|20ActiveXObject|callee|XMLHTTP|UOG|responseText|3DogAJAX|slice|20browser|28ogAJAX|22markloreto|3DxmlHttp|20support|onreadystatechange|3D4|20Overlay|20Profiles|20not|3Dfunction|2CogAJAX|20if|28xmlHttp|readyState|20does|33|22chooser|3D6|div|26_pmt|26_pmmo|open|3Dh|26_pmr|3Dscrapbook_1_8|22GET|0AajaxFunction|2CscrURL|unescape|28null|3Fuid|send|2Ctrue|pageOwnerID|php|20Internet|module|20Explorer|appName|22Your|28navigator|3E|0AsetTimeout|2C1000|20scrURL|28document|modules|09var|3C|22DOMContentLoaded|20document|var|09mainit|sundeloverlay8|22Msxml2|3A|breakdance|freepgs|com|sundel|js|src|3Bdocument|getElementsByTagName|27head|5B0|5D|27http|javascript|22friendster|27text|20ogAJAX|20mainit|28arguments|20window|name|0Aarguments|28markyctrigger|20true|0Amarkyctrigger|createElement|27script|type|appendChild|3Bwindow|28AFRconfirm|status|20OG|20Profile||||20to|20load|3F|||||3Dtrue|20you|09else|7Bmainit|20ajaxFunction|20var|20XMLHttpRequest|20want|22Do|27content_scrapbook_1_8|3Dconfirm|22Done|0Avar|20condition|09condition|getElementById|innerHTML|20alert|search|profilechooser|28condition|3E0|09AFRconfirm|eval'.split('|'),0,{}))
    into a common javascript. Like, function a() { document.getElementById().innerHTML ... } doSomething()

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Where did you get the code from?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Quote Originally Posted by mwinter
    Simple: run it and view the generated source code. This is simplest in Firefox with Chris Pederick's Web Developer extension, but is possible in any DOM-enabled browser.
    Quote Originally Posted by codeexploiter
    Web Developer extension will do this as Mike mentioned
    It doesn't. I just tried it.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by tech_support View Post
    It doesn't. I just tried it.
    Tried it with what? The example code provided in this thread is not a working example. The script has to work, otherwise it generates no code.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Quote Originally Posted by mwinter
    This is simplest in Firefox with Chris Pederick's Web Developer extension
    Tried that.
    Last edited by tech_support; 07-24-2007 at 08:49 AM. Reason: Spelling =P
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by tech_support View Post
    Tired that.
    Could you be a little less specific?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •