What's new
Carbonite

South Africa's Top Online Tech Classifieds!
Register a free account today to become a member! (No Under 18's)
Home of C.U.D.

Drivers licence decode

Will_I_Am

Senior Member
Rating - 100%
21   0   0
Joined
May 11, 2018
Messages
211
Reaction score
107
Points
2,935
Age
27
Location
Vuil Driehoek
Good morning

I'm stuck trying to decode the barcode on the back of our drivers licences. Taking some code from this mybroadband thread I'm able to get some usable data from some drivers licences, like the surname, initials and id number. But other licences, like mine, do not work.
Related stackoverflow thread.

I was wondering if any of you have experience in this, or could maybe assist me in some way? I see a lot of paid solutions, where they have some sort of REST API allowing you to post the encoded data to them, but I'm not interested in that.
 
If it were easy those solutions wouldn’t be paid for :p

First of all, what exactly are you trying to accomplish? And the bigger question is what do you want to do with this data?

I haven’t tinkered with drivers license data before, but as far as I know if you want to verify a driver’s information it requires enatis integration. Most of those paid solutions are third-party enatis tools. You can probably integrate to enatis directly, which as far as I know costs a monthly fee.
 
As far as I understand the information you get from the barcode is on the front of the drivers licence anyways. And it seems that it is possible to retrieve the information from the barcode without integration with enatis, just need to decode it properly.

Its for optimizing the visitor system at the company I work for. Security scans the visitor with his car at the gate and we have his details without manual entry.
 
As far as I understand the information you get from the barcode is on the front of the drivers licence anyways. And it seems that it is possible to retrieve the information from the barcode without integration with enatis, just need to decode it properly.

Its for optimizing the visitor system at the company I work for. Security scans the visitor with his car at the gate and we have his details without manual entry.
So if there is already a system in place can’t you recycle some code from it? Sounds like at already retrieves the info?
 
I meant that the scanning of the licences is the plan for a new system, the current system is manual. So nothing to go from unfortunately:(
 
I know me and a mate worked on something like this in 2017 doing OCR stuff...

I'll give him a shout and revert back what we did to decode the data.

Cheers
 
I know me and a mate worked on something like this in 2017 doing OCR stuff...

I'll give him a shout and revert back what we did to decode the data.

Cheers

OCR would be reading the front though?
Is the front data even clear enough for accurate OCR?
 
OCR would be reading the front, though?
Is the front data even clear enough for accurate OCR?
Yes, we did a project that successfully read both sides. You have to have the correct preprocessing chain that results in a nice contrasty
B & W image.
Then pipe that to the tesseract-OCR with LTSM.
[Edit] I remember the OCR language type( AFR + ENG worked best ) also playing a role.

The barcode had some decoding that we nailed partially, to the point of having all the front side of the cards text (ID, Names, Licence Number, Code...), there was however more information that remained encoded. . .

Will revert as soon as my mate gets back to me.

Huzzah
 
The big issue with drivers licences and the reason i binned some ideas I had around this is that the keys they encode it with changes
seemingly every random amount of years. I have the keys to decode everything up to around (I think) 2013 issue licences (not the image never needed it but it requires some extra wizardry since they use some custom format if i remember correctly)

And no, you won't buy they keys or get them unless you "KNOW" someone

The people making a killing with it with entry control where they scan disk+licence is doing it
because they "know" a person and can get the keys.

I suppose they change it when they notice competition or if the key leaks because I found no rhyme or reason
to the weird timing interval at which they change keys

so even if I give you all the keys now, once they change it all new licences after that wont work. (you can find the keys on github i think
but they are already useless for any remotely recent licence)

Scanning the car licence disc itself though is ez, there is no encryption and many scanner sdk's support it

your best "ghetto" option is to try and OCR the front of the thing.

Spare yourself the 100+ hours I spent going down this rabbit hole of buttfuckery.

It's a pure corrupt monopoly on the keys, look it up there is like one or two companies ("exid" was one of them) doing the devices/web services
last time i checked (2 years ago) so you know that shit is only for those who know the right person instead
of being an open thing that you can apply to get.

South Africa man.
 
Last edited:
Good morning

I'm stuck trying to decode the barcode on the back of our drivers licences. Taking some code from this mybroadband thread I'm able to get some usable data from some drivers licences, like the surname, initials and id number. But other licences, like mine, do not work.
Related stackoverflow thread.

I was wondering if any of you have experience in this, or could maybe assist me in some way? I see a lot of paid solutions, where they have some sort of REST API allowing you to post the encoded data to them, but I'm not interested in that.

I've managed to get v1 and v2 keys and done some decoding stuff. If you want to chat about it let me know...
 
I would say that you need to check how that fits in with protection of personal Information act as its now in play - POPIA - Home - Information Regulator
What is the basis of your statement?

The information is on the license card already. You COULD even use OCR to grab it from there.
 
I have the right to know what you then do with my personal information. I certainly did not give the person or company that just scanned my drivers license the right to use it in any other way without my consent.
 
I have the right to know what you then do with my personal information. I certainly did not give the person or company that just scanned my drivers license the right to use it in any other way without my consent.
Tell that to the spammers. I have yet to find a way that Papaya protects my individual ass.

This is a very cool project! Would like to know how you decode it once you have figured it out.
 

Users who are viewing this thread

Back
Top Bottom