Code Monkey home page Code Monkey logo

fingerprint-suite's Introduction

NPM dev version Downloads Chat on discord Build Status

fingerprint-suite is a handcrafted assembly of tools for browser fingerprint generation and injection. Today's websites are increasingly using fingerprinting to track users and identify them. With the help of fingerprint-suite you can generate and inject browser fingerprints into your browser, allowing you to fly your scrapers under the radar.

View full documentation, guides and examples on the fingerprint-suite website

Would you like to work with us on our fingerprinting tools or similar projects? We are hiring!

Overview

fingerprint-suite is a modular toolkit for browser fingerprint generation and injection. It consists of the following npm packages, which you can use separately, or together:

  • header-generator: generates configurable, realistic HTTP headers
  • fingerprint-generator: generates realistic browser fingerprints, affecting the HTTP headers and browser JS APIs
  • fingerprint-injector: injects browser fingerprints into your Playwright or Puppeteer managed browser instance
  • generative-bayesian-network: our fast implementation of a Bayesian generative network used to generate realistic browser fingerprints

Quick start

The following example shows how to use the fingerprinting tools to camouflage your Playwright-managed Chromium instance.

const { chromium } = require('playwright');
const { FingerprintGenerator } = require('fingerprint-generator');
const { FingerprintInjector }  = require('fingerprint-injector');

(async () => {
    const fingerprintGenerator = new FingerprintGenerator();

    const browserFingerprintWithHeaders = fingerprintGenerator.getFingerprint({
        devices: ['desktop'],
        browsers: ['chrome'],
    });

    const fingerprintInjector = new FingerprintInjector();
    const { fingerprint } = browserFingerprintWithHeaders;

    const browser = await chromium.launch({ headless: false });

    // With certain properties, we need to inject the props into the context initialization
    const context = await browser.newContext({
        userAgent: fingerprint.userAgent,
        locale: fingerprint.navigator.language,
        viewport: fingerprint.screen,
    });
   
    // Attach the rest of the fingerprint
   await fingerprintInjector.attachFingerprintToPlaywright(context, browserFingerprintWithHeaders);

   const page = await context.newPage();
   // ... your code using `page` here
})();

Support

If you find any bug or issue with any of the fingerprinting tools, please submit an issue on GitHub. For questions, you can ask on Stack Overflow or contact [email protected]

Contributing

Your code contributions are welcome and you'll be praised for eternity! If you have any ideas for improvements, either submit an issue or create a pull request. For contribution guidelines and the code of conduct, see CONTRIBUTING.md.

License

This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details.

fingerprint-suite's People

Contributors

b4nan avatar barjin avatar jacobmoyle avatar petrpatek avatar renovate[bot] avatar szmarczak avatar vladfrangu 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.