0.0.14 • Published 3 years ago

@ehp/dnsbl v0.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@ehp/dnsbl

Query DNS-based blackhole lists

Support both IPv4 and IPv6 queries. Written in TypeScript. Thanks to @silverwind for the initial version in JavaScript.

Supported by StartupMail

Installation

npm i @ehp/dnsbl

Usage

import dnsbl from '@ehp/dnsbl';

await dnsbl.lookup('127.0.0.2', 'zen.spamhaus.org');
// true

await dnsbl.lookup('127.0.0.2', 'zen.spamhaus.org', {includeTxt: true});
// {
//   listed: true,
//   txt: [['some txt'], ['another txt']]
// }

await dnsbl.batch(['1.2.3.4', '5.6.7.8'], ['dnsbl.somelist.net', 'dnsbl.someotherlist.net']);
// [
//   { blacklist: 'dnsbl.somelist.net', address: '1.2.3.4', listed: true },
//   { blacklist: 'dnsbl.somelist.net', address: '5.6.7.8', listed: false },
//   { blacklist: 'dnsbl.someotherlist.net', address: '1.2.3.4', listed: true },
//   { blacklist: 'dnsbl.someotherlist.net', address: '5.6.7.8', listed: false }
// ]
0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago