fsid

package
v1.8.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package fsid decodes an FSID (the JA4-inspired fingerprint id produced by fpscanner's generateFingerprintScannerId) back into a fingerprint object.

Only the fields the FSID actually encodes can be recovered: bitmasks, screen geometry, cpu/memory, language and timezone. Everything else was folded into truncated hashes and is gone; those fields are simply left out of the object.

Stdlib only on purpose: no crowdsec imports, so it stays usable from anywhere (cscli, tests, standalone tooling).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSID

type FSID struct {
	Raw     string
	Version string

	Detections map[string]bool
	Automation map[string]bool

	Width, Height int
	CPUCount      int
	Memory        int
	Device        map[string]bool

	Features   map[string]bool
	Extensions map[string]bool
	Plugins    map[string]bool

	ModifiedCanvas bool
	HasMediaSource bool

	Language  string
	LangCount int
	Timezone  string

	Contexts map[string]bool

	// Hashes of the signals the FSID does not carry in clear.
	Hashes map[string]string
	// Sections kept verbatim, handy when a section fails to match.
	Sections map[string]string
	Warnings []string
}

func Parse

func Parse(raw string) (*FSID, error)

Parse decodes an FSID string. Sections that fail to decode are reported in Warnings rather than as an error: a partially readable FSID is still useful.

func (*FSID) Fingerprint

func (f *FSID) Fingerprint() map[string]any

Fingerprint rebuilds the JSON wire shape consumed by challenge.FingerprintData, with only the fields the FSID encodes.

func (*FSID) WriteHuman

func (f *FSID) WriteHuman(w io.Writer)

WriteHuman renders a readable summary of what the FSID carries.

Jump to

Keyboard shortcuts

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