Shield Base
Shield Base
CLI and programmatic toolkit for compiling offline-ready IP intelligence databases from BGP, GeoIP, Tor, FireHOL, and other public threat feeds into MMDB and LMDB formats.
@riavzon/shield-base aggregates, processes, and compiles network intelligence data from multiple public sources into offline binary formats. It fetches BGP routing tables, geographic location databases, threat intelligence lists, verified crawler IP ranges, and more, then consolidates them into ready-to-use MMDB and LMDB databases for security analysis and traffic filtering.
The tool works both as an interactive CLI powered by Consola and as a fully typed programmatic library.
Shield Base is the data layer that powers the Bot Detector module. All MMDB and LMDB databases it compiles are read directly by the bot detection pipeline.
Features
Interactive Wizard
Choose only the databases you need or compile them all. Supports flag-based execution for CI/CD environments.
Dual Compiler
Compiles IP range data into MMDB format via mmdbctl, and key-value data into LMDB .mdb databases with no external binary required.
13 Built-in Sources
BGP/ASN, City, Country, Tor, Proxy, FireHOL threat levels (L1-L4 + Anonymous), verified crawlers, suspicious user-agents, and disposable emails.
Type Generation
Automatically generates fully typed TypeScript interfaces from any JSON input, for both custom data and built-in datasets.
LMDB Reader
Inspect any .mdb database from the command line with the lm-read subcommand, including get, range, prefix, count, exists, stats, and drop operations.
Programmatic API
Every data source and compiler is exported as a typed function you can call directly from your build scripts or application code.