Wednesday

How to take defensive driving online course in 1 hour instead of 6 hours (e.g. getdefensive.com)

(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

38 comments:

  1. to anyone who is worried about this being illegal. First of all, these websites are privatley run. Meaning they are not run by any government or law enforcement agency. Their main goal is to get as many people paying for and taking the course as possible. The last thing a website like this wants to do is scare people away by making it known that they actively look for scammers. Ive taken the course legitamatley about 6 times and hacked it (once i discovered the hack) about 6 times as well. As far as im concerned, if youve taken the course at least once for 6 hours, then youve done your job. Why do i possibly need to wast 6 hours of my life on something that i know inside and out. Its no deterent to me making a traffic violation. The goverment just uses this as a way to make an extra 24$ a pop for all violators under the age of 25 (on more year for me thank god). They dont care if you are hacking it as long as they get money and you pass the course, the 6 hours doesnt really matter to them. They just implemented the rule so that the class seemed more serious rather than having it easily passed by everyone in less than one hour. If it took 15 min to take the class and it cost 25$, people would be like this is so stupid, im getting ripped off. But when they force a 6 hour time requirement, it makes it seem like a legitamate "course".

    ReplyDelete
  2. Wow, this sounds like such an amazing plan. I'd love to do an online defensive driving course in Texas. I have always wanted to learn how to drive better.

    ReplyDelete
  3. Anonymous1:14 AM GMT+2

    Will this still work in 2013? I'm also in Texas.

    Thanks.

    ReplyDelete
  4. For anyone interested, this still works as of August 2013

    ReplyDelete
    Replies
    1. Anonymous7:52 AM GMT+2

      will this work as of May 2014

      Delete
  5. Anonymous1:32 PM GMT+1

    I enjoyed reading this post and found useful information here. Large companies located across the country can benefit from nationwide locations with standardised courses in driver CPC Training.
    hgv cpc training & cpc exam

    ReplyDelete
  6. It's a good idea to be skilled in defensive driving. You can only control what you do on the road. You can't control what others do. That's the scary thing. I wonder if they'll teach you how to drive in hazardous conditions as well. http://www.247texasdriversafety.com/

    ReplyDelete
  7. Anonymous9:44 PM GMT+2

    Still Works as of August 2015.
    Suggestion: The videos are unskippable towards the end, but a few can be skipped if you drag the play bar to the last few seconds and let it finish. If anyone has knowledge on how to skip the videos altogether, that would be great. They use JWplayer.

    ReplyDelete
  8. Took a look at the source code. Make a second button for javascript:videoDone() to be able to skip the videos

    ReplyDelete
  9. Interrupt13h10:32 PM GMT+2

    Works as of Sept 2015 at GetDefensive.com. The fastest way is to install firefox, then install firebug add-on and enable it. Then log into your course and start taking it. Then on the top right corner of firefox you will see the little firebug icon. Click this icon and it should load a split window at the bottom of the web page. One of the tabs at the bottom says console. Click console and paste this inside it on the right side:

    VideoDoneFlag=true;
    TimerDoneFlag=true;
    document.getElementById("ctl00_MainContent_butNext").click();

    Next click run and it will automatically tell the web page that you watched the video, waited the allotted timer time and clicked the next button all in one sweep. So now you don't need to use the next button. Just keep clicking the run button on firebug's console window. Of course when you get to the questions you have to answer those and if I had more time I would have looked into that part but this should be good enough.

    ReplyDelete
  10. Took under 20 minutes with the above method. To use the above method its also useful to paste each line one by one into the console window from the bottom edit box until all 3 show up in the console window then hit Run.

    ReplyDelete
  11. Anonymous5:33 AM GMT+1

    Confirm above still works November 2015. Took 26 minuted 44 seconds with a 3 minute smoke break. The extortionists at the court and police department got their money and I get to go on with my damn life.

    ReplyDelete
  12. forbiddendonut1:49 PM GMT+1

    So I tried this earlier this week in December 2015, here's the problem I had:
    -all the click throughs worked
    -when I got to the test, I would have scored a 100 but when I hit submit the website told me the clock timed out so I got zero credit while in firefox.
    -I took the test again but this time I only googled in chrome while taking the test, same thing, I finished before the timer but the website told me I timed out and therefore I didn't pass the test again.
    -took the test the third and final time in chrome and it did the same thing saying I timed out the test, so no passing grade for me.

    I spent a lot of money on expediting shipping of certain items and now I cannot get a refund. I took all three tests before 6hrs had passed from the opening of my account. Question, in light of this, should I even contact support to see if I can take the test again? I would have passed all three attempts.

    ReplyDelete
  13. Thank you so much for this helpful article,..
    angularjs training

    ReplyDelete
  14. Thanks for sharing this really amazing and nice blog,.
    javascript image editor

    ReplyDelete
  15. Has anyone gotten in trouble at all?

    ReplyDelete
  16. Good Information are there about Online Course of Driving.Driver Ed Coupon

    ReplyDelete
  17. pleasant post, stay aware of this fascinating work. It truly regards realize that this subject is being secured likewise on this site so cheers for setting aside time to talk about this! Driving classes

    ReplyDelete
  18. Is this still working?

    ReplyDelete
  19. This is a topic close to my heart cheers, do you have a RSS feed I can use? driving instructors

    ReplyDelete
  20. https://www.royaltykitten.com/hairless-cats-for-sale-near-me/
    https://www.royaltykitten.com/sphynx-cat-breeders-near-me/
    https://www.royaltykitten.com/hairless-kitten-for-sale/
    https://www.royaltykitten.com/hairless-cats-for-sale/
    https://www.royaltykitten.com/sphynx-breeders/

    ReplyDelete
  21. https://www.royaltykitten.com/sphynx-cats-for-sale/
    https://www.royaltykitten.com/sphynx-cat-for-sale-near-me/
    https://www.royaltykitten.com/sphynx-kitten-adoption-2/
    https://www.royaltykitten.com/sphynx-kitten-for-sale/
    https://www.royaltykitten.com/kittens-for-sale-near-me/

    ReplyDelete
  22. Wow! Such a fantastic and helpful post . visa Turkey is a legalized entry Permit which is connected to the person’s passport that allows one to enter into Turkey for touristic purposes and many other purposes.

    ReplyDelete
  23. It s a very useful page. Thank you. 45f581928b8d04454fe287d1c2169ae2
    sapanca
    suloglu
    nallihan
    golova
    banaz
    sultanhisar
    muradiye
    kesan
    afsin

    ReplyDelete
  24. It s a very useful page. Thank you. aac46a79748032154d3b68ab975665cb
    bozcaada
    mesudiye
    hizan
    boronova
    selendi
    dalaman
    guzelyurt
    avanos
    tarsus

    ReplyDelete
  25. It s a very useful page. Thank you. 01b6fc81e13ef879b5583e5efe871868
    koprubasi
    havran
    yenimahalle
    turgutlu
    bingol
    germencik
    atasehir
    yesilyurt
    yenisehir

    ReplyDelete
  26. Congratulations on your article, it was very helpful and successful. 3a0af9729d099a00b79dd58624c2f6ce
    numara onay
    website kurma
    website kurma

    ReplyDelete
  27. Thank you for your explanation, very good content. a6dec1056b97ec233602e298d657da97
    altın dedektörü

    ReplyDelete