GithubHelp home page GithubHelp logo

alexhayes / fingerprintjs2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fingerprintjs/fingerprintjs

0.0 2.0 0.0 818 KB

Modern & flexible browser fingerprinting library

Home Page: http://valve.github.io/fingerprintjs2/

License: Other

JavaScript 97.65% ActionScript 0.30% Makefile 0.05% HTML 1.64% Shell 0.37%

fingerprintjs2's Introduction

Fingerprintjs2

npm

Support library on Patreon!


Original fingerprintjs library was developed in 2012, it's now impossible to evolve it without breaking backwards compatibilty, so this project will be where all the new development happens.

This project will use significantly more sources for fingerprinting, all of them will be configurable, that is it should be possible to cherry-pick only the options you need or just enable them all.

I'm also paying special attention to IE plugins, popular in China, such as QQ, Baidu and others.

This project will not be backwards compatible with original fingerprintjs.

This project uses semver.

Installation

  • CDN: //cdn.jsdelivr.net/npm/fingerprintjs2@<VERSION>/dist/fingerprint2.min.js or https://cdnjs.com/libraries/fingerprintjs2
  • Bower: bower install fingerprintjs2
  • NPM: npm install fingerprintjs2
  • Yarn: yarn add fingerprintjs2

Usage

new Fingerprint2().get(function(result, components) {
  console.log(result) // a hash, representing your device fingerprint
  console.log(components) // an array of FP components
})

Note: You should not run fingerprinting directly on or after page load. Rather, delay it for a few milliseconds to ensure consistent fingerprints. See #307, #254, and others.

Options

You choose which components to include in the fingerprint, and configure some other stuff.

new Fingerprint2({swfPath: '/assets/FontList.swf', excludeUserAgent: true})

By default, almost all components are included in the fingerprint, except for the following:

  • DNT header
  • Device pixel ratio
  • Audio fingerprint on iOS 11

See wiki for a full list of available options and details as to why some are excluded by default: https://github.com/Valve/fingerprintjs2/wiki/List-of-options

On my machine (MBP 2013 Core i5) + Chrome 46 the default FP process takes about 80-100ms. If you use extendedJsFonts option this time will increase up to 2000ms (cold font cache). This option can incur even more overhead on mobile Firefox browsers, which is much slower in font detection, so use it with caution on mobile devices.

To speed up fingerprint computation, you can exclude font detection (~ 40ms), canvas fingerprint (~ 10ms), WebGL fingerprint (~ 35 ms), and Audio fingerprint (~30 ms).

Other

Future development

Many more fingerprinting sources will be implemented, such as (in no particular order)

  • Multi-monitor detection,
  • Internal HashTable implementation detection
  • WebRTC fingerprinting
  • Math constants
  • Accessibility fingerprinting
  • Camera information
  • DRM support
  • Accelerometer support
  • Virtual keyboards
  • List of supported gestures (for touch-enabled devices)
  • Pixel density
  • Video and audio codecs availability

To recompile the FontList.swf file:

  • Download Adobe Flex SDK
  • Unzip it, add the bin/ directory to your $PATH (mxmlc binary should be in path)
  • Run make

Talk about the library (in Russian) on FrontEnd Conf 2015

https://player.vimeo.com/video/151208427

License: MIT or Apache, whichever you prefer.

fingerprintjs2's People

Contributors

valve avatar jonashaag avatar antoinevastel avatar sanasol avatar undemian avatar nuschk avatar hiuny avatar msp avatar chandra158 avatar sleepprogger avatar guzzter avatar otanim avatar triptec avatar gheek avatar klevytskyi avatar khusnetdinov avatar nkconnor avatar virpo avatar lapkritinis avatar robertjgabriel avatar schinkentanz avatar skapoor avatar tcyrus avatar albimcleod avatar daper avatar leafo avatar lrlinde avatar mdxs avatar ugwe43to874nf4 avatar kevindice avatar

Watchers

Alex Hayes avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.