spamscanner 7.0.5 → 7.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +161 -37
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/esm/cli.js +178 -35
- package/dist/esm/cli.js.map +3 -3
- package/dist/esm/index.js +150 -26
- package/dist/esm/index.js.map +3 -3
- package/dist/types/dnsbl.d.ts +19 -3
- package/dist/types/tokenizer.d.ts +2 -1
- package/package.json +1 -1
package/dist/types/dnsbl.d.ts
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
export function isLookupName(name: any): boolean;
|
|
2
|
+
/**
|
|
3
|
+
* The name a link host is looked up as. The URL parser keeps characters no
|
|
4
|
+
* host name has ("!", ",", "{", "~" and more, also from "%2C") and empty or
|
|
5
|
+
* long labels; such a name cannot be looked up, but Cloudflare's resolvers
|
|
6
|
+
* block a name by its parent domains too (and so would a mail client's
|
|
7
|
+
* resolver), so it is looked up as its longest suffix of labels that can be,
|
|
8
|
+
* at most 253 characters: "x!y.evil.example" as "evil.example". Dots it ends
|
|
9
|
+
* with, however many, are left out ("evil.example..." is evil.example), and
|
|
10
|
+
* a name in Unicode is looked up in ASCII. Null when that leaves no label, or
|
|
11
|
+
* only a public suffix ("com", "co.uk", "github.io"), and for an address.
|
|
12
|
+
* In linear time.
|
|
13
|
+
* @param {string} host
|
|
14
|
+
* @returns {string|null}
|
|
15
|
+
*/
|
|
16
|
+
export function lookupName(host: string): string | null;
|
|
2
17
|
/**
|
|
3
18
|
* An IP address as blocklists and allowlists know it: without an IPv6 zone
|
|
4
19
|
* ("fe80::1%eth0"), and an IPv4 address mapped into IPv6 ("::ffff:192.0.2.1",
|
|
@@ -120,9 +135,10 @@ export class DnsChecker {
|
|
|
120
135
|
answers: string[];
|
|
121
136
|
}>>;
|
|
122
137
|
/**
|
|
123
|
-
* Ask Cloudflare's filtering resolvers about host names
|
|
124
|
-
*
|
|
125
|
-
* resolver is "
|
|
138
|
+
* Ask Cloudflare's filtering resolvers about host names, each by the name
|
|
139
|
+
* it is looked up as (see lookupName), once; the findings name it. A name
|
|
140
|
+
* blocked by the malware resolver is "malware"; one blocked only by the
|
|
141
|
+
* family resolver is "adult". The hosts that got no answer (from the malware
|
|
126
142
|
* resolver, or from the family resolver when asked) are listed in the
|
|
127
143
|
* result's (non-enumerable) `unanswered` property.
|
|
128
144
|
* @param {string[]} hosts
|
|
@@ -94,8 +94,9 @@ export function obfuscationOf(text: string, options?: {
|
|
|
94
94
|
* @returns {string}
|
|
95
95
|
*/
|
|
96
96
|
export function registrableDomain(host: string): string;
|
|
97
|
-
export function extractLinks(text: any, html: any, { maxLength }?: {
|
|
97
|
+
export function extractLinks(text: any, html: any, { maxLength, bareHosts }?: {
|
|
98
98
|
maxLength?: number;
|
|
99
|
+
bareHosts?: boolean;
|
|
99
100
|
}): any[];
|
|
100
101
|
/**
|
|
101
102
|
* The value of the first href attribute of a tag ("<a ...>"), or null:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spamscanner",
|
|
3
3
|
"description": "Spam, phishing and malware filter for email in any language: a trainable classifier, link and attachment checks, SPF/DKIM/DMARC, and an optional AI second opinion from any LLM, including local Ollama models. Works as a library, CLI, Postfix milter or HTTP API.",
|
|
4
|
-
"version": "7.0.
|
|
4
|
+
"version": "7.0.7",
|
|
5
5
|
"author": "Forward Email (https://forwardemail.net)",
|
|
6
6
|
"bin": {
|
|
7
7
|
"spamscanner": "./dist/esm/cli.js"
|