UNPKG

hackoon

Version:
108 lines (107 loc) 3.91 kB
/// <reference types="node" resolution-mode="require"/> import { Buffer } from "node:buffer"; /** * @typedef {Object} FingerprintingInfo An object that holds all the system information * used for fingerprinting * * @property {string} EOL - OS-defined end-of-line (typically LF or CR+LF) * @property {string} endianness - CPU and/or OS-defined multibyte integer endianness * @property {string} manufacturer - Computer manufacturer * @property {string} model - CPU model * @property {string} serial - CPU serial * @property {string} uuid - CPU UUID * @property {string} vendor - Bios vendor * @property {string} biosVersion - Bios version * @property {string} releaseDate - Bios release date * @property {string} boardManufacturer Board manufacturer * @property {string} boardModel Board model * @property {string} boardSerial Board serial * @property {string} cpuManufacturer CPU manufacturer * @property {string} brand CPU brand * @property {string} speedMax CPU speed max * @property {number} cores CPU cores * @property {number} physicalCores CPU physical cores * @property {string} socket CPU socket type * @property {number} memTotal Total system memory * @property {string} platform OS type * @property {string} arch OS architecture * @property {string[]} hdds List of HDDs concatenated model and serial */ /** * @constant FINGERPRINTING_INFO Available system parameters for fingerprint calculation * @type FingerprintingInfo */ export declare const FINGERPRINTING_INFO: { EOL: string; endianness: "BE" | "LE"; manufacturer: string; model: string; serial: string; uuid: string; vendor: string; biosVersion: string; releaseDate: string; boardManufacturer: string; boardModel: string; boardSerial: string; cpuManufacturer: string; brand: string; speedMax: string; cores: number; physicalCores: number; socket: string; memTotal: number; platform: string; arch: string; hdds: string[]; }; /** * @constant FINGERPRINTING_PARAMETERS A list of string that names available parameters * to be considered during fingerprinting * @type {string[]} */ export declare const FINGERPRINTING_PARAMETERS: string[]; /** * Calculates the 512-bit fingerprint using this system's parameters. * Additional customisation of which parameters are accounted for are available through the `options` parameter. * @param {object} [options={}] An object that controls which system parameters should be used for * fingerprint calculation * @param {string[]} [options.only=FINGERPRINTING_PARAMETERS] An inclusive property list; if provided, * only properties listed here are used for calculation * @param {string[]} [options.except=[]] An exclusive property list; if provided, all available properties * not listed here are used for calculation * @returns {Buffer} The 512-bit fingerprint as a `Buffer` */ export declare function getFingerprint({ only, except, }?: { only?: string[] | undefined; except?: never[] | undefined; }): Buffer; /** * Gets the available system parameters to be used in fingerprinting calculation. * This parameters can be used in conjunction with the `getFingerprint()` function to customise fingerprint generation. * @returns {FingerprintingInfo} An object containing all the available fingerprinting parameters */ export declare function getFingerprintingInfo(): { EOL: string; endianness: "BE" | "LE"; manufacturer: string; model: string; serial: string; uuid: string; vendor: string; biosVersion: string; releaseDate: string; boardManufacturer: string; boardModel: string; boardSerial: string; cpuManufacturer: string; brand: string; speedMax: string; cores: number; physicalCores: number; socket: string; memTotal: number; platform: string; arch: string; hdds: string[]; };