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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2007
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Web page Timer Script Bypass

    Hey There!

    I am a novice with Javascript and would like to know if there is a way to manipulate this code on a web page to bypass the timer function that prevents a user from moving forward until a certain number of seconds have passed.

    I have succeeded in manipulating the representation of the timer on the actual page to show" You can move on now!" by changing variable "Seconds" to "0" by typing into the address bar "javascript:alert(Seconds=0)".

    However, when I then press the HTML "continue" button there is some back end check being done that still prevents me from moving forward and the timer continues from where it had left off before I pressed the "continue" button.

    Below is the javascript and a piece of the HTML code which contains the "Continue" button. Any insight would be very much appreciated! Thanx!

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    <!--
    function TimesUp(){
    document.getElementById('Timer').innerHTML = 'You can move on now!';

    TimeOver = true;
    Finished = true;
    }

    //CODE FOR HANDLING TIMER
    //Timer code
    var Seconds = 2032;
    var Interval = null;

    function StartTimer(){
    Interval = window.setInterval('DownTime()',1000);
    document.getElementById('TimerText').style.display = 'inline';
    }

    function DownTime(){
    var ss = Seconds % 60;
    if (ss<10){
    ss='0' + ss + '';
    }

    var mm = Math.floor(Seconds / 60);

    if (document.getElementById('Timer') == null){
    return;
    }

    document.getElementById('TimerText').innerHTML ='Time Left: ' + mm + ':' + ss;
    if (Seconds < 1){
    window.clearInterval(Interval);
    TimeOver = true;
    TimesUp();
    }
    Seconds--;
    }


    //-->

    <div align="center">
    <div id="Timer"><span id="TimerText">&nbsp;&nbsp;</span></div><br>
    <a href="/show.php?show=RDM0NTYzODR8MXxxfHwxMjE3NDc3MzIzfDI0MDA=">Continue</a></div>

    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!--
    setTimeout('StartTimer()', 50);
    //-->

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,898
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    Why do you want to do this? Is it a game or test which you are trying to circumvent?

    I have succeeded in manipulating the representation of the timer on the actual page to show" You can move on now!" by changing variable "Seconds" to "0" by typing into the address bar "javascript:alert(Seconds=0)".
    Yes, pretty well all Javascript novices know how to do that!
    Last edited by Philip M; 07-31-2008 at 07:54 AM.


  •  

    Posting Permissions

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