How to renew your drivers licence online in New South Wales

The Roads And Traffic Authority (RTA) of New South Wales, Australia, has a fantastic feature to renew your drivers licence online.

Yay! Now i don’t have to wait in long queues!!!

canrenew

Problem

It doesn’t actually work. As soon as you hit renew via the above link and click register for an account you will be prompted to fill in a recaptcha that isn’t actually there.

whererecaptcha.png

Any attempt to register will ask you to please verify that you’re not a robot despite that being impossible. This error has been happening for the past week for me. No fix in sight. Now that it’s the weekend I’ve got time to find a way to make this work.

Am I a Robot?

Assuming i’m not actually a robot… there must be something broken on the site. Using Chrome lets inspect and find out.

bingo

Bingo! The website has a local copy of a script, recaptcha.js that then tries to fetch a URL hosted directly via Google. Someone at Google has moved that URL at some point in history, presumably a simple version upgrade and the RTA website has been broken ever since. Lesson to be learnt here. Be very careful using third party Javascript libraries on your site.

Ok lets work around this

I really can’t go into an RTA office. I’m overseas right now and I need to renew my licence.

Google has a demo of recaptcha. It has the above files (albeit a newer version) load successfully except they’re from a different URL. We could at this point create a webserver and host the files and hack our hosts file up, install a fake certificate auth, etc.

But it’s easier to use a browser plugin. I ended up going with Switcheroo for Chrome. No affiliation to that plugin, i promise! It’s just the first plugin for the task at hand that came up.

We simply replace the recaptcha.js URL that the RTA website uses with the URL that the Google uses.

Specifically i’m replacing via the above plugin

https://my.service.nsw.gov.au/MyServiceNSW/resource/1497728015000/snswAssets/recaptcha.js

with

https://www.gstatic.com/recaptcha/api2/r20170717162708/recaptcha__en.js

 

Easy and convenient!

The option is now there and we can register an RTA online account and proceed with renewing our drivers licence online!

I can confirm it all works for me now and my licence is renewed.

 

This should also fix any issues you have doing online car registrations. Hopefully the RTA will fix it but i wouldn’t hold your breath.

Advertisements

One thought on “How to renew your drivers licence online in New South Wales”

  1. Hey, just wanted to say a HUGE thankyou! I did a quick google search to see if there was ANYTHING I could do (not hoping for much, since there aren’t many people like you, and also I didn’t think anyone would have the same problem).

    And even though I don’t know anything about programming, you made it so simple. Now I feel like a hacker and I can get my shit done at the same time.

    Thanks so much for writing this!!!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s