Device And Browser Fingerprint Generator – imprint.js

Category: Javascript , Others | January 8, 2018
Author: mattbrailsford
Views Total: 348
Official Page: Go to website
Last Update: January 8, 2018
License: MIT

Preview:

Device And Browser Fingerprint Generator – imprint.js

Description:

imprint.js is a JavaScript library that automatically runs a list of tests and generates unique Device And Browser Fingerprints for further use.

How to use it:

Install it with NPM.

# NPM
$ npm install imprintjs --save

Import the imprint.js into your module.

// ES 6
import imprint from 'imprintjs';

// CommonJS:
const imprint = require('imprintjs');

Specify the tests you want to run.

var browserTests = [
    "audio",
    "availableScreenResolution",
    "canvas",
    "colorDepth",
    "cookies",
    "cpuClass",
    "deviceDpi",
    "doNotTrack",
    "indexedDb",
    "installedFonts",
    //"installedLanguages",
    "language",
    "localIp",
    "localStorage",
    "pixelRatio",
    "platform",
    "plugins",
    "processorCores",
    "screenResolution",
    "sessionStorage",
    "timezoneOffset",
    "touchSupport",
    "userAgent",
    "webGl"
];

var deviceTests = [
    "audio",
    "colorDepth",
    "cpuClass",
    "deviceDpi",
    "localIp",
    "platform",
    "installedFonts",
    "processorCores",
    "publicIp",
    "screenResolution",
    "timezoneOffset"
];

Generate the Device And Browser Fingerprints.

console.time('getImprint 1');
imprint.test(browserTests).then(function(result){
  console.timeEnd('getImprint 1');
  document.getElementById("browserFingerprint").innerHTML = result;
});

console.time('getImprint 2');
imprint.test(deviceTests).then(function(result){
  console.timeEnd('getImprint 2');
  document.getElementById("deviceFingerprint").innerHTML = result;
});

Leave a Reply