Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10

Thread: Obfuscated?

  1. #1
    New Coder
    Join Date
    Jan 2008
    Location
    Lulworth, Dorset, England
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Obfuscated?

    I have a js file that looks like this:

    //MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006 Valerio Proietti, <http://mad4milk.net>, MIT Style License.
    eval(function(A,G){return A.replace(/(\w+)/g,function(a,b){return G[parseInt(b,36)]})}("0 1=2(3){0 4=2(){5 (0 6 7 8){9 (8[6]) 8[6].a=8;}\n9 (b[c]....

    and ends like this:

    ...llTop,pageYOffset,getScrollLeft,scrollLeft,pageXOffset,onDomReady,init,state,readyState,childNode s,all,navigator,taintEnabled,loaded,complete,script,_ie_ready_,write,id,defer,src,readystatechange,m yInit,callee,done,load,DOMContentLoaded".split(",")));

    I want to get at the js to modify the behaviour and what it puts into the page. Is this code coded in some way?

    What are my options for decoding it? (I have tried one deobfuscation tool which just repeated it back to me as is!

    The file is called mootools.js and is the only file apart from slimbox.js which is a js file.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You can try downloading the uncompressed version of mootools.
    http://mootools.net/download
    Older versions are still there as well.
    Code:
    http://mootools.net/download/get/mootools-x.x.x-core-nc.js
    Where x.x.x is the version number. You currently have 1.1.1 so you can download the uncompressed version.
    Last edited by _Aerospace_Eng_; 02-06-2009 at 08:33 PM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,184
    Thanks
    10
    Thanked 569 Times in 550 Posts
    you can view it by changing "eval" to "alert".

    if you want to extract it, one way is to remove "eval", and assign the expression to the .value of a textarea.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/1/19) IE7:0.2, IE8:6.7, IE11:7.4, IE9:3.8, IE10:4.4, FF:18.3, CH:43.6, SF:7.8, MOBILE:27.5

  • #4
    New Coder
    Join Date
    Jan 2008
    Location
    Lulworth, Dorset, England
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I tried the uc version but when clicking the image the lightbox did not open, just a new page with the larger image. The other js file is slimbox.js. Is this relevant? Any further advice on getting the uc 1.1.1 version working welcome.

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Attach your mootools.js file. You may need to put it in a zip file or link us directly to it if you can.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    New Coder
    Join Date
    Jan 2008
    Location
    Lulworth, Dorset, England
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, I've volunteered for a local group which I'm a member. It's better if you see the page it's on and the js file is inline. The page is:

    http://www.newsite.lulworthsociety.o...d=48&Itemid=58

    Click Quiz and then on the first image. Hope it's all there. PS I have copied across a mootools 1.11 version (they all fail). If you want to see the obfuscated one I will have to put it back. I would like to get a source one working.

    PS2 the idea of this quiz is to enable people to answer by printing the page as a PDF (config. later). If there was a form version where the answers could be submited as well that would be great.
    Last edited by cantthinkofanic; 02-07-2009 at 04:10 PM.

  • #7
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Please put the obfuscated one back up. You could also try using this.

    http://javascript.about.com/library/blformat.htm
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #8
    New Coder
    Join Date
    Jan 2008
    Location
    Lulworth, Dorset, England
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OK, I have put the old one back.

  • #9
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Attached are two versions of your original code from two different code formatters.
    Attached Files Attached Files
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #10
    New Coder
    Join Date
    Jan 2008
    Location
    Lulworth, Dorset, England
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your efforts I will have a good look at those.


  •  

    Posting Permissions

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