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 6 of 6

Thread: Challenge

  1. #1
    jdo
    jdo is offline
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Challenge

    Hi all,

    Im trying to complete a security challenge. Im not very good with javascript but I need to debug this code, can anyone help with it?


    <script>
    function o(e){var k='';for(var i=0;i<e.length;i+=arguments.callee.toString().length-141){k+=String.fromCharCode(e.charCodeAt(i)>>1);}eval(k);}
    o('\\PNx@zDD@zD^D@zDfff\\D|x^ |NRv');
    </script>

    Many thanks

  • #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
    The whole idea behind the challenge is for you to do it yourself not for you to ask others for help. Why do you need to debug it anyways? Its obvious someone doesn't want you to know what it says.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    jdo
    jdo is offline
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There are different stages of the challenge before this one which ive gotten through but this part has me stumped. The hint says it need debugging.
    I really dont have a clue what the above is supposed to do. Im not asking for anyone to solve it for me, just a pointer.
    Ive googled the functions and im still getting nowhere.

  • #4
    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
    Get Firefox and test the script. Firefox will give you errors telling you the general problem. Where are you taking these challenges?
    Last edited by _Aerospace_Eng_; 12-11-2006 at 08:28 PM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Debugging the script

    If you are looking for the problem, it lies in how the for loop is constructed.

    Place an alert(k) before eval(k), and then change the ;i+=bunch_of_junk to ;i++, you will get some very interesting information from the alert.

    Dave

  • #6
    jdo
    jdo is offline
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your help guys, youve been really great!


  •  

    Posting Permissions

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