Coder Social home page Coder Social logo

Comments (3)

Kikobeats avatar Kikobeats commented on July 17, 2024

updated with an example!

from fingerprint-suite.

barjin avatar barjin commented on July 17, 2024

Hello @Kikobeats - and thank you for your interest in this project!

All our generated data is based on collected data from real web traffic. Without going into too much detail, we have a (constantly updating) dataset of user fingerprints. These contain the user-agent string as well as more intricate details (screen resolution, total amount of memory installed in the system etc.)

During the training phase, we take all these attributes and train a Bayesian network on them. Every possible value of any attribute is then expressed as a conditional probability of the "parent" attributes.

Now, this is where the user-agent comes to play. In our Bayesian network, all the fingerprint fields are based on the user-agent field. For example, let's say our training dataset had 5 records in total, 2 with user-agent: 'desktop', 3 with user-agent: 'mobile'. The other fields are based on those - e.g. for screenResolution, the probability distribution of screen sizes will be skewed towards smaller screens with user-agent:mobile. Every fingerprint combination with non-zero conditional probability must have existed in the training data - this way, we ensure we're generating convincing fingerprints all the time.

Because of this, the user-agent strings need to be sampled from our collection of known user-agents. If you were to submit your own free-form user-agent string, it might not be in the conditional probability tables for the other fingerprint fields and the header-generator would not be able to generate the fingerprint.

Unfortunately, this makes this feature a wontfix for me... But we're still curious! Is there a use case you have for this? We'd love to hear it! Hopefully, we'll be able to find another way around the problem you're trying to solve.

Cheers!

from fingerprint-suite.

Kikobeats avatar Kikobeats commented on July 17, 2024

No worries and thanks for the explanation, it's really helpful to understand how the library works.

I asked for that because I already has a collection of most used user agent that is updated periodically:
https://github.com/microlinkhq/top-user-agents/blob/master/src/mobile.json

This data is collected from more than 100M that are performed every month, so the sample is large enough.

In order to simulate real traffic, I want to generate realistic headers based in the user agent as input. I already did some tuning with https-tls about TLS fingerprint but I though that maybe I canse use fingerprint-suite to get realistic browser headers (sec-*, etc).

I noted the library is at the end of the process outputting the headers that is the thing I need, so I tried to play a bit with the code to see if I would get similar headers as output but using an user agent as input.

I still think it's possible if found a way to turn the user agent into an unique browserlist match or any other way to connect it before going to bayesian network 😆 but I totally understand it's not the point of the project.

from fingerprint-suite.

Related Issues (20)

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.