Giter VIP home page Giter VIP logo

rajesh-royal / broprint.js Goto Github PK

View Code? Open in Web Editor NEW
309.0 5.0 54.0 829 KB

The world's easiest, smallest and powerful visitor identifier for browsers.

Home Page: https://broprintjs.netlify.app/

License: MIT License

HTML 8.97% CSS 3.32% TypeScript 46.66% JavaScript 41.04%
fingerprinting browserfingerprint jsfingerprint uniquebrowserid cryptography audio-fingerprinting canvas-fingerprinting frauddetection javascript reactjs typescript visitor-identifier identification

broprint.js's Introduction

Broprint.js

The world's easiest, smallest and powerful visitor identifier for browsers.

Current NPM version Tweet



This package generates a unique ID/String for different browsers. Like chrome, Firefox or any other browsers which support `canvas` and `audio` fingerprinting. You can easily do the browser fingerprinting with this library. Its small and minimal.


CodeSandbox, Live Demo

โš  The code is completely open source and not relating to anyone, created in my spare time. [only for educational purpose]

The algorithms used to encrypt/decrypt data - murmurhash3_32_gc, cyrb53 and javaHashCode. Code is inside .src/code/EncryptDecrypt.js.

๐Ÿ™‰ What's all the hullabaloo?

Broprint.js helps JavaScript developers code visitors identifier more simply, readably, and securely. Whether you need to find a unique visitor, do analytics, browser fingerprinting, or do anything of the like while even preventing frauds, we've got you covered at a cryptographically strong level. The best part? Our library is extremely lightweight and developer friendly- which means it won't take a toll on your project, and it's uber-simple to implement. This library works on the concept of canvas fingerprint and audio fingerprint, the final result which a user get is the combination of audio and canvas fingerprint. We are using cryptojs under the hood for encryptions but you can easily tweek the library to remove the dependency.



โšก Fast implementation

Step 1: Install using npm or yarn:

Using npm:

//Install:
npm i @rajesh896/broprint.js

Using Yarn:

//Install:
yarn add @rajesh896/broprint.js



๐ŸŽ‰ Examples

In Reactjs

import { getCurrentBrowserFingerPrint } from "@rajesh896/broprint.js";

getCurrentBrowserFingerPrint().then((fingerprint) => {
    // fingerprint is your unique browser id.
    // This is well tested

    // the result you receive here is the combination of Canvas fingerprint and audio fingerprint.
})

Using this script in the html files

  1. Execute npm i @rajesh896/broprint.js
  2. Then -
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>FingerPrint</title>
</head>

<body>
    <script type="module">
        import("./node_modules/@rajesh896/broprint.js/index.js").then((module) => {
            module.getCurrentBrowserFingerPrint().then((fingerprint) => {
                console.log(fingerprint);
            })
        })
    </script>
</body>

</html>
  • From version 1.1.0 onwards we have a dependency crypto-js. If you do not want to have this dependency then use the earlier versions of this library.

If you want to use it in simple .html file, please read the index.html file in the root directory.

This repository is for educational and demonstration purposes only!

๐Ÿ‘ Supporters

Stargazers repo roster for @Rajesh-Royal/Broprint.js Forkers repo roster for @nRajesh-Royal/Broprint.js

Animated footer bars


Back to top

broprint.js's People

Contributors

joelburget avatar rajesh-royal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

broprint.js's Issues

Fingerprint changes on firefox.

I am running reactJS 18.2.0 with vite 4.0.0. Ive noticed that the fingerprint changes sometimes on POST requests. I really dont have any way of reproducing but sending a bunch of POST requests.

import { getCurrentBrowserFingerPrint } from "@rajesh896/broprint.js";
getCurrentBrowserFingerPrint().then((fingerprint) => {
  setData("fingerprint", fingerprint);
});

That is the code I use to get the fingerprint. Now the only way I've been able to make the request change is by sending POST requests to my login URL. Below you can find two requests where the fingerprint changed.

Tool used: https://toolbox.googleapps.com/apps/har_analyzer

Type:application/json
Raw Content:
{
  "email": "[email protected]",
  "password": "123",
  "remember": false,
  "fingerprint": 2888701962297835
}
Type:application/json
Raw Content:
{
  "email": "[email protected]",
  "password": "123",
  "remember": false,
  "fingerprint": 1708234812133861
}

If there is anything else I can do to help solve this please let me know.

EDIT: Firefox version is 123.0.1 (64-bits). OS: MacOS

Accuracy

How does this compare to fingerprint js (pro) in terms of accuracy?

Hang in lockdown mode

When using an iPhone (or presumably any other Apple device) in lockdown mode, calls to getCurrentBrowserFingerPrint just hang, probably due to the use of the Web Audio API.

CDN?

I'd like to implement it using CDN if it is possible,

Fingerprint parameter change handling

Hello! Does this lib handle changes in fingerprint paramrters, like browser version, ip change, screen resolution e.t.c? Or any change=new fingerprint? Are hashes with slight change similiar?

README has typo

import { getCurrentBrowserFingerPrint } from "npm i @rajesh896/broprint.js";

should be

import { getCurrentBrowserFingerPrint } from "@rajesh896/broprint.js";

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.