UNPKG

node_js_ipqs_db_reader

Version:

A Node JS implementation of the IPQualityScore flat file IP reputation database reader.

20 lines (19 loc) 559 B
/// <reference types="node" /> import * as Binary from "./BinaryOption"; import { FileHandle } from "node:fs/promises"; import IPQSRecord from "./IPQSRecord"; import Column from "./Column"; export default class FileReader { fileHandler?: FileHandle; binaryData?: Binary.Bitmask; blacklistFile: boolean; valid: boolean; IPv6: boolean; treeEnd: number; treeStart: number; recordBytes: number; totalBytes: number; columns: Column[]; static readonly TREE_PREFIX_BYTES = 5; Fetch(ip: string): Promise<IPQSRecord>; }