Generates realistic, randomized HTTP headers (User-Agent, Accept-Language, sec-ch-ua, etc.) based on browser/OS/device constraints. Supports HTTP/1 and HTTP/2 header sets.
// Source: https://github.com/apify/fingerprint-suite | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { readFileSync } from 'fs';
import { BayesianNetwork, utils } from 'generative-bayesian-network';
import ow from 'ow';
import {
SUPPORTED_BROWSERS,
BROWSER_HTTP_NODE_NAME,
MISSING_VALUE_DATASET_TOKEN,
OPERATING_SYSTEM_NODE_NAME,
DEVICE_NODE_NAME,
SUPPORTED_OPERATING_SYSTEMS,
SUPPORTED_DEVICES,
SUPPORTED_HTTP_VERSIONS,
HTTP1_SEC_FETCH_ATTRIBUTES,
HTTP2_SEC_FETCH_ATTRIBUTES,
} from './constants';
import {
getBrowser,
getUserAgent,
getBrowsersFromQuery,
shuffleArray,
} from './utils';
const browserSpecificationShape =
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key