Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Any1 know how to view the original src of encoded javascript

Options
  • 13-02-2003 1:27pm
    #1
    Closed Accounts Posts: 156 ✭✭


    Im trying to unencode a block of javascript that is encoded - any ideas much appreciated.

    Joe


Comments

  • Registered Users Posts: 4,276 ✭✭✭damnyanks


    Perhaps post the code here ?


  • Closed Accounts Posts: 156 ✭✭JJSolutions


    The following is sample code that is encoded (and it is JScript not javascript as i mentioned doh)

    <SCRIPT LANGUAGE="JScript">
    <!--//
    //Copyright© 1998 Microsoft Corporation. All Rights Reserved.
    //**Start Encode**
    function verifyCorrectBrowser(){
    if(navigator.appName == "Microsoft Internet Explorer")
    if (navigator.appVersion.indexOf ("5.") >= 0)
    return(true);
    else
    return(false);
    }
    function getAppropriatePage(){
    var str1 = "Had this been an actual Web site, a page compatible with ";
    var str2 = "browsers other than ";
    var str3 = "Microsoft Internet Explorer 5.0 ";
    var str4 = "would have been loaded.";
    if (verifyCorrectBrowser())
    document.write(str1 + str3 + str4);
    else
    document.write(str1 + str2 + str3 + str4);
    }
    //-->
    </SCRIPT>



    gets encoded to the following

    <SCRIPT LANGUAGE="JScript.Encode">
    <!--//
    //Copyright© 1998 Microsoft Corporation. All Rights Reserved.
    //**Start Encode**#@~^QwIAAA==@#@&amp;0;mDkWP7nDb0zZKD.n1YAMGhk+Dvb`@#@&amp;P,kW`UC7kLlDGDcl22gl:n~{'~Jtr1DGkW6YP&xDnD+OPA62sKD+ME#@#@&amp;P,~~k6PvxC\rLmYGDcCwa.n.kkWU bx[+X66Pcr*cJ#,@*{~!*P~P,P~.YEMU`DDEbIP,P,+s/n@#@&amp;P~P,~PM+O;Mx`WC^/n#pN6EU1YbWx,oObaw.WaDrCD+nmL+v#@#@&amp;~P7lMPdY.q,'~J_CN,Y4rkP4nnPCx,C1Y;mV,+(PkrY~~l,wCLPmKhwmYk(snPSkDt~JI@#@&amp;P~\m.PkY.+,'PE8MWA/.kPGDtDPDtmUPri@#@&amp;,P-CMP/D.&,'Pr\rmMWkWWY~(YnDnY,2a2^WDn.,* !,Ep@#@&amp;,P7lD,/D.c,'~JSW;s9Ptm-+,4+U~VKl9+[REI,Pr0,c\DrWHZW..mOAMGS/nM`*#@#@&amp;P,~P9W^Es+UOchDbO+v/YMq~_,/DDfPQ~kY.c*IP,+sd@#@&amp;~~,P[W1;s+UDRSDkD+vdYMF~_,/O.yP_,dYM&P3~dYMc*iNz&R
    //-->
    </SCRIPT>


    I have read somwhere that it is possible to view the code by using a javascript:alert functionwhich will decode the code and display the original but i cant get it working :(


    Joe


  • Closed Accounts Posts: 156 ✭✭JJSolutions




  • Closed Accounts Posts: 1,414 ✭✭✭tom-thebox


    Thanks JJ that link is coming in handy for myself too.

    Regards


Advertisement