(reduce the time, speed up the course, by skipping the timer on each page that makes you wait)
See the older posts below.
The simplest method is to get Opera browser, set up the UserJS directory (and configure in Opera), and create the userjs javascript override file in that directory.
That will then neutralize the timer on each defensive driving page.
This is simple because Opera has a magic variable trick that can automate changing the TimerDoneFlag variable on each page.
If it doesn't work, you will have to figure out if the defensive driving timer code has changed - see hints below.
References:
http://www.opera.com/browser/tutorials/userjs/examples/
http://userjs.org/help/tutorials/overriding-variables
Older material of interest:
Hacking the Online Defensive Driving Course in TX, by King Zarathu - Jan 04, 09:38 PM
Now, I say “hacking,” but that’s a small exaggeration. To some, it was hacking. To me, it was a programmer being a complete and total moron. Check this out.
The law states that I am forced to take 6 hours of my precious (and I mean precious, dammit!) time and actually care about the most obvious facts about life and little statistics that nobody could care less about, just because I did 10 MPH over the speed limit. Lame. I decided to do the opposite.
The timer is what forces me to stay on the page. I can’t hit the “Next” button unless the “Time Remaining” reaches “00:00.” It comes up with a message box saying, “You have not spent [time] on this page, yet!” There’s one solution.
Let’s consider that JavaScript is a CLIENT-BASED script. This has nothing to do with the server, so I’m basically manipulating my own computer to correspond differently with the server. You can always view the JavaScript source code that is being executed, which makes the process a lot (and not “alot,” like they had it spelled in the course. Heh, Texans….) easier.
Right-click > View Source
This allows you to scan through the HTML and find out where the script is located at. JavaScript sources generally end in “js.”
http://www.getdefensive.com/js/timer.js
That would be the Timer class. Thanks to the default encapsulation involved, I couldn’t directly modify the “deadline” attribute, so I had to find another way to get things done. On the pages that you see as you are taking the course, there is some JavaScript that instantiates the Timer as an object and uses public methods. One of these methods is doneTimer(). Bingo!
The doneTimer() method simply modifies certain attributes that allow you to click the “Next” button and carry you onto the next page.
Type in “javascript:doneTimer()” in your address bar, hit Enter, and then press “Next.” It’s literally that easy.
The timer will continue to count down to 00:00, but it doesn’t mean you won’t be able to carry on through to the next page. After copying and pasting all of the pages into a notepad document, I passed the final exam with a 20/20 – 100%.
If you ever have to take one of these silly online courses, don’t waste your time.
Time Enforced By Law: 6:00 Hours.
Time Taken: 1:13 Hours.
Moral of the story: If you’re a webmaster or programmer, make sure your code is secure.
- King Zarathu - Jan 04, 09:38 PM
yo yo yo from Texas, land of the free.
A few tips and updates:
1. the online course cited/hacked above is www.GetDefensive.com
2. Whereas at the time of the hack above the site’s script used the method doneTimer(), now (2007-06-14) it has changed to timerDone().
3. I found I could use the same easy technique as the original blog entry, that is, to paste “javascript:timerDone()” into my browser address and hit enter to disable the timer.
4. Since the function had changed, I had to teach myself how to hack the code. Here is a data-dump for anyone wanting to repeat my steps:
a. use firefox, download the firebug add-on.
b. login to GetDefensive.com and go to a page with a timer
c. Tools-> Firebug-> Open Firebug, then click on script tab, then click on the script for the page itself from the drop down (not timer.js)
d. search the page’s scripts for the word timer
e. note the function name: for me, it was timerDone()
f. use the trick above to enter the function in your browser window for each page with a timer
5. However, using the Opera browser’s UserJS (or greasemonkey scripting in Firefox), there is an even better way to do this: to run your own script on each page that neutralizes the timer without having to run it manually on each page. Steps:
a. learn how to install a UserJS for Opera in your custom UserJS directory
b. create a file named: getdefensive.com.js in your UserJS directory
b2. (this script actually modifies another variable in each page’s DOM, the TimerDoneFlag, and sets it to true – this is another way of disabling the timer but does not use the timerDone() function)
c. edit your file and put in the following function:
opera.defineMagicVariable( ‘TimerDoneFlag’, function () { return true; }, null
);
d. Save and close getdefensive.com.js file. Now Opera can apply this script to pages on getdefensive.com (and you can specify to run this UserJS only on that site if you prefer).
e. The result is that you can simply click through each page and answer the quizzes and be done.
— freedomof Jun 14, 11:49 PM
Wow this is awesome information. I wonder if I can just run through it and make my insurance lower as well.. hmm
— Andrew Aug 06, 11:16 AM
I think that someone did the same on http://comedydefensivedriving.com
I’m looking for the link, I will post it here when I find it
— Franz Jul 17, 06:40 PM
just so you know this is hella illegal, it says so when you sign up for the course. A felony I believe.
— ANON Oct 27, 01:26 AM
Here’s an excerpt from the contract:
Timers: STUDENT is required to spend a minimum amount of time on each chapter of the material, which will be specified in each section and chapter by a page timer. Page timers may not be circumvented by clicking the quit icon. If STUDENT exits the course before the page timer has expired, he/she will not be given credit for the page content.
— Zarathu Oct 31, 08:16 AM
Not only is this illegal, but consider the following: The timer may be a client side script just to reduce load on the web servers. It would be extremely easy for the developers to store timestamps when the timed page is served and also when it is submitted back to the server. It would then be fairly easy to check if the time required has passed.
— E Nov 22, 12:53 PM
Perhaps, but it would be odd to use JavaScript as a method to reduce server overhead and yet check the timestamps anyway, don’t you think?
— Zarathu Nov 27, 04:25 PM
Use Firebug and remove the onclick event on the next button to remove timer validation. Just did that yesterday
— Defensive Driver Aug 10, 07:54 PM
Wednesday
Subscribe to:
Posts (Atom)