Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to identify unique devices using javascript?

I was wondering how streaming service providers like Netflix, Hulu, Sling.. et identify my device when I login using web Browser on my labtop.
I couldn't find any Javascript APIs to get a GUID or so.

like image 860
Amged Avatar asked Jul 28 '19 09:07

Amged


People also ask

How can I get a unique device ID in JavaScript?

There is no way to get any kind of identifier that is truly unique and unchangeable from the client. This means no MAC address, serial number, IMSI, or any of those other things.

How can you identify a uniquely device?

Use UUID UUID. randomUUID() method generates an unique identifier for a specific installation. You have just to store that value and your user will be identified at the next launch of your application.

How can you identify a uniquely mobile device?

Android device IDs are determined during the device's first boot. Users can access their devices' randomly generated Android IDs by downloading a free app from Google Play. These device identification numbers should remain constant for the lifetime of the device unless the user performs a factory reset.

How do I identify a uniquely device from my browser?

How do I find my Chrome device ID? Open Chrome on your Android device. In the Remote Devices tab on your computer, click the tab that matches your Android device model name. At the top of this page, you see your Android device's model name, followed by its serial number.


1 Answers

You can use the fingerprintJS2 library for your project too.

https://fingerprintjs.com/

How this library gets fingerprints

Fingerprint.js collects all the unique features from a device/browser passing them through a hash function to provide a unique identifier.

Example enter image description here

There are many other ways to get unique browser fingerprint.

The newest method to obtain browser information is called “Canvas Fingerprinting.” Simply put, websites are written in HTML5 code, and inside that code, there is a little piece of code that takes your browser’s fingerprint.

So, how are websites doing that, exactly? Let me explain.

This new tracking method that websites employ to obtain your browser fingerprint is enabled by new coding features in HTML5.

HTML5 is the coding language used to build websites. It’s the core fundamentals of every website. Within the HTML5 coding language, there’s an element which is called “canvas.”

Originally, the HTML element was used to draw graphics on a web page.

Wikipedia provides the following explanation on how exploiting the HTML5 canvas element generates browser fingerprinting:

“When a user visits a page, the fingerprinting script first draws text with the font and size of its choice and adds background colors. Next, the script calls Canvas API’s ToDataURL method to get the canvas pixel data in dataURL format, which is basically a Base64 encoded representation of the binary pixel data. Finally, the script takes the hash of the text-encoded pixel data, which serves as the fingerprint."

In plain English, what this means is that the HTML5 canvas element generates certain data, such as the font size and active background color settings of the visitor’s browser, on a website. This information serves as the unique fingerprint of every visitor.

In contrast to how cookies work, canvas fingerprinting doesn’t load anything onto your computer, so you won’t be able to delete any data, since it’s not stored on your computer or device, but elsewhere.

Source and further reading: https://pixelprivacy.com/resources/browser-fingerprinting/

https://multilogin.com/everything-you-need-to-know-about-canvas-fingerprinting/

By the way you can get much more information from Googling yourself.

like image 136
Hisham___Pak Avatar answered Oct 17 '22 23:10

Hisham___Pak