Coder Social home page Coder Social logo

fake-fingerprint's Introduction

fake fingerprint

generate fake fingerprint of browser.

简体中文

Example

run fingerprint genreate.

no fake before:

before

fake after:

after

Install

npm install fake-fingerprint

Usage

import FakeFingerPrint from "fake-fingerprint";

const instance = new FakeFingerPrint({
  config: {
    /* navigator object of browser. can change it's some property. */
    navigator: {
      userAgent: "Custom UA",
      // more navigator value
    },
    /* screen object of browser. can change it's some property. */
    screen: {
      width: 9999,
      height: 88,
      // more screen value
    },
    canvas: {
      fillText: "hello fake",
    },
    audio: {
      strength: 100,
    },
    timezone: {
      zone: "America/New_York",
      locale: "en-US",
      offset: -5,
    },
    webGL: {
      driver: "ANGLE (NVIDIA GeForce GTX 1050 Ti Direct3D11 vs_5_0 ps_5_0)",
    },
    webRTC: {
      address: "127.0.0.1",
    },
  },
  /* 
    Report when the modified method is called or the properties of the proxy are accessed. 
    eg:{type:'navigator',key:'UserAgent'}  
  */
  report: (arg) => {
    console.log("arg:", arg);
  },
  /* report when these keys are accessed  */
  reportKeys: ["userAgent", "appVersion", "toDataURL"],
});

instance.open();

API

Arguments of FakeFingerPrint.

name explain type required
config generate the configuration fake uses object no
report when property or function to be visit. It‘s will be invoke function yes
reportKeys need keys of report. default null, will report all keys key[] no

Config:

name explain example
navigator navigator object of browser, You can configure UA,appAgent other navigator object information {userAgent: "Custom UA",appName: "123"}
screen screen object of browser, You can configure width,height and other screen object information {width:8888,height:123}
canvas when invoked toDataURL, custom genereate fillText {fillText:'test'}
audio when genreate fingerprint. need add noise strength {strength: 100}
timezone custom timezone info. offset is Offset equivalent to standard time, unit is hour {zone: "America/New_York",locale: "en-US",offset: -5}
webGL reutrn driver of information {driver: "ANGLE (NVIDIA GeForce GTX 1050 Ti Direct3D11 vs_5_0 ps_5_0)"}
webRTC custrom ip address {address:"127.0.0.1"}

Instance Property.

name explain type example
open open configuration of fake fingerprint, If no parameter is specified, all configurations are enabled by default function instance.open(['navigator','canvas'])
close close configuration of fake fingerprint, If no parameter is specified, all configurations are closed by default function instance.close(['navigator','canvas'])
set set configuration of fake fingerprint function instance.set({ navigator: { userAgent: 'Custom UA' } })
getKeysStatus get the currently configured category usage function {close:['navigator','canvas'],open:['canvas','webGL']}

License

MIT @hemengke1997

Inspiration

by my-fingerprint

fake-fingerprint's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.