fingerprints

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 5 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fingerprints generates browser fingerprint data compatible with BrowserForge.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fingerprint

type Fingerprint struct {
	Screen            ScreenFingerprint    `json:"screen"`
	Navigator         NavigatorFingerprint `json:"navigator"`
	Headers           map[string]string    `json:"headers"`
	VideoCodecs       map[string]any       `json:"videoCodecs"`
	AudioCodecs       map[string]any       `json:"audioCodecs"`
	PluginsData       map[string]any       `json:"pluginsData"`
	Battery           map[string]any       `json:"battery,omitempty"`
	VideoCard         *VideoCard           `json:"videoCard,omitempty"`
	MultimediaDevices []string             `json:"multimediaDevices"`
	Fonts             []string             `json:"fonts"`
	MockWebRTC        bool                 `json:"mockWebRTC"`
	Slim              bool                 `json:"slim"`
	Raw               map[string]any       `json:"-"`
}

func Generate

func Generate(options Options) (*Fingerprint, error)

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(options Options) (*Generator, error)

func (*Generator) Generate

func (g *Generator) Generate(options Options) (*Fingerprint, error)
type NavigatorFingerprint struct {
	UserAgent           string         `json:"userAgent"`
	UserAgentData       map[string]any `json:"userAgentData"`
	DoNotTrack          *string        `json:"doNotTrack"`
	AppCodeName         string         `json:"appCodeName"`
	AppName             string         `json:"appName"`
	AppVersion          string         `json:"appVersion"`
	Oscpu               string         `json:"oscpu"`
	Webdriver           string         `json:"webdriver"`
	Language            string         `json:"language"`
	Languages           []string       `json:"languages"`
	Platform            string         `json:"platform"`
	DeviceMemory        any            `json:"deviceMemory"`
	HardwareConcurrency int            `json:"hardwareConcurrency"`
	Product             string         `json:"product"`
	ProductSub          string         `json:"productSub"`
	Vendor              string         `json:"vendor"`
	VendorSub           string         `json:"vendorSub"`
	MaxTouchPoints      int            `json:"maxTouchPoints"`
	ExtraProperties     map[string]any `json:"extraProperties"`
}

type Options

type Options struct {
	Screen     *Screen
	Strict     bool
	MockWebRTC bool
	Slim       bool
	Headers    headers.Options
	RNG        RNG
}

type RNG

type RNG = bayes.RNG

type Screen

type Screen struct {
	MinWidth  int
	MaxWidth  int
	MinHeight int
	MaxHeight int
}

func (Screen) IsSet

func (s Screen) IsSet() bool

func (Screen) Validate

func (s Screen) Validate() error

type ScreenFingerprint

type ScreenFingerprint struct {
	AvailHeight      int     `json:"availHeight"`
	AvailWidth       int     `json:"availWidth"`
	AvailTop         int     `json:"availTop"`
	AvailLeft        int     `json:"availLeft"`
	ColorDepth       int     `json:"colorDepth"`
	Height           int     `json:"height"`
	PixelDepth       int     `json:"pixelDepth"`
	Width            int     `json:"width"`
	DevicePixelRatio float64 `json:"devicePixelRatio"`
	PageXOffset      int     `json:"pageXOffset"`
	PageYOffset      int     `json:"pageYOffset"`
	InnerHeight      int     `json:"innerHeight"`
	OuterHeight      int     `json:"outerHeight"`
	OuterWidth       int     `json:"outerWidth"`
	InnerWidth       int     `json:"innerWidth"`
	ScreenX          int     `json:"screenX"`
	ClientWidth      int     `json:"clientWidth"`
	ClientHeight     int     `json:"clientHeight"`
	HasHDR           bool    `json:"hasHDR"`
}

type VideoCard

type VideoCard struct {
	Renderer string `json:"renderer"`
	Vendor   string `json:"vendor"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL