Skip to content

Commit c7b693f

Browse files
TMHSDigitalclaude
andcommitted
Keep -axfr and -dry-run off targets -exclude rules out (#372)
The scan refuses an out-of-scope target in its preflight, but -axfr, the passive sources and the -dry-run preflight ran before that check and queried it anyway. A shared scan.TargetOutOfScope test now gates all three, axfr.Options gains a Skip hook so excluded name servers are neither resolved nor contacted (mirroring TakeoverCache.Skip from #316), and the dry-run preflights are paced by -rate. The library applies the same rules to Config.Sources and ZoneTransfer(). Fixes #372 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent aac485f commit c7b693f

15 files changed

Lines changed: 212 additions & 17 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7171
- Less memory on large wordlists and busy scans: `-sources`, `-ct`, `-axfr` and `-permute` check their names against the wordlist without building a set as large as it (about 200 MB per feature and target on a 5M-line list), a `-simulate-zone` lab scan no longer keeps a count per queried name (about 170 MB on a 1M-line list), and a `CNAME` lookup reads a UDP answer into a buffer sized for the 1232-byte EDNS payload it advertises instead of 64 KB. Results are unchanged (#321).
7272

7373
### Fixed
74+
- `-exclude` now keeps an out-of-scope target free of the queries sent before its scan, which used to go out before the scan refused it: `-axfr` no longer looks up its name servers, probes them or asks them for a transfer, `-ct` and `-sources` no longer ask about it, and `-dry-run` marks it out of scope (`out_of_scope` in JSON) instead of sending its preflight. `-axfr` also neither resolves nor contacts a name server that `-exclude` rules out, and the `-dry-run` preflights are paced by `-rate`. In `pkg/subenum`, a `Domain` that `Exclude` rules out gets no `Sources` lookup, and `ZoneTransfer()` skips excluded name servers (#372).
7475
- A `-recursive` scan stopped during its `-retry-inconclusive` pass, then resumed, no longer counts a name below depth 1 twice when the retry pass had recovered it. The part a resume repeats was tallied before the retry pass moved the name to its new outcome, so the saved counters kept it under that outcome while the resumed run counted it again, and the outcome counts no longer added up to `processed`; the tally now follows the name to its new outcome (#374).
7576
- A lookup is counted as `refused` only when the resolver answered with RCODE REFUSED or a DNS-over-HTTPS server shed load with HTTP 429 or 503. A socket error such as "connection refused", from a closed `-dns-server` port or a resolver that is down, used to be counted as `refused` too, so the verdict, the preflight error and the reliability guard pointed at rate limiting when the address was wrong; it is now counted as `other`, the same on every platform (#377).
7677
- A `CNAME` lookup no longer waits out its `-timeout` when a resolver ignores the advertised 1232-byte EDNS size and sends a larger UDP answer without setting TC. The read cut the answer, which then failed to parse and was skipped as a stray packet (on Windows the lookup failed as `other`); it is now asked again over TCP as if truncated. A matching UDP answer that fits but does not parse fails at once instead of timing out (#375).

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ This table describes `main`, which can be ahead of the latest release: a release
238238
| `-w <file>` | bundled top-5000 | Wordlist file, one prefix per line; `#` comments allowed; `-` reads stdin. Repeat it to combine lists (`-w general.txt -w target.txt`); entries found in more than one are scanned once. Omit it to use the built-in list (see [Choosing a wordlist](#choosing-a-wordlist)) |
239239
| `-dL <file>` | n/a | File of apex domains to scan, one per line (`-` reads stdin), instead of a `<domain>` argument. Each domain is an independent scan; results share one output |
240240
| `-type <list>` | `A,AAAA` | Comma-separated record types to look up: `A`, `AAAA`, `CNAME`, `NS`, `MX`, `TXT`. A name is found when it has a record of any listed type. `CNAME` and `NS` also check for [takeovers](#subdomain-takeover-hints); `MX` values are `<preference> <host>` |
241-
| `-exclude <list>` | n/a | Comma-separated out-of-scope names: exact (`vpn.example.com`) or `*.parent` (every name below `parent`, not `parent` itself). Excluded names are never queried, probed or expanded, and are counted as `excluded` |
241+
| `-exclude <list>` | n/a | Comma-separated out-of-scope names: exact (`vpn.example.com`) or `*.parent` (every name below `parent`, not `parent` itself). Excluded names are never queried, probed or expanded, and are counted as `excluded`. A target that is itself out of scope is refused before `-axfr`, `-ct`/`-sources` or the `-dry-run` preflight touch it, and `-axfr` never resolves or contacts an excluded name server |
242242
| `-exclude-file <file>` | n/a | Same patterns, one per line (`#` comments allowed), e.g. a bug-bounty program's out-of-scope list |
243243
| **Finding more names** | | |
244244
| `-sources <list>` | n/a | Keyless passive sources whose names become candidates and `-permute` seeds: `ct` (crt.sh), `wayback` (Wayback Machine). One HTTPS request per source and target |
@@ -290,7 +290,7 @@ This table describes `main`, which can be ahead of the latest release: a release
290290
| `-simulate-zone <file>` | n/a | Lab mode: answer every query from a scenario file, or a built-in scenario such as `lab1` (`lab1`-`lab6`, with their own wordlist when `-w` is not given), via a local DNS server on `127.0.0.1`; no traffic leaves the machine. See [Labs](docs/labs.md) |
291291
| **Modes** | | |
292292
| `-tui` | `false` | Launch the interactive Terminal UI |
293-
| `-dry-run` | `false` | Print the plan without scanning: candidates after dedupe and `-exclude`, query and duration estimates, and the resolver preflight (its only DNS query), then exit; JSON with `-format json` or `jsonl` |
293+
| `-dry-run` | `false` | Print the plan without scanning: candidates after dedupe and `-exclude`, query and duration estimates, and the resolver preflight (its only DNS query, paced by `-rate` and skipped for a target `-exclude` rules out), then exit; JSON with `-format json` or `jsonl` |
294294
| `-print-config` | `false` | Print every setting's effective value and source (`flag`, env, config or default), then exit |
295295
| `-version` | n/a | Print version and exit |
296296

‎docs/library.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ These queries go to the domain's own name servers, not to `Resolver`, and they a
129129
| `TakeoverProviders`{% include unreleased.html library="TakeoverProviders" %} | built-in list | Extra takeover-prone services (`{Suffix: ".example-cdn.net", Name: "example-cdn"}`) for `provider:` hints, added to the built-in list; a `Name` of `-` removes a suffix. `TakeoverProvidersOnly` uses them alone. |
130130
| `RetryInconclusive`{% include unreleased.html library="RetryInconclusive" %} | false | Once every candidate is tried, look up each name that timed out, was refused or failed once more against `Resolver`. Names it resolves are reported but not expanded by `Recursive`. `Stats.Retried` and `Stats.Recovered` count the pass; `Stats.Inconclusive` lists the names still without an answer. |
131131
| `Sources`{% include unreleased.html library="Sources" %} | none | Passive sources whose names are added after `Words` and looked up like them: `CertificateTransparency()`, `WaybackMachine()`, `ZoneTransfer(opts)` (see [Zone transfers](#probezone-zone-transfers)), or your own `Source` (one `Names(ctx, domain)` method). A source that fails sends a `NoticeSource` event and the scan goes on. Ignored with `Simulate`. |
132-
| `Exclude` | none | Out-of-scope names and `*.parent` branches, never queried. |
132+
| `Exclude` | none | Out-of-scope names and `*.parent` branches, never queried. A `Domain` it rules out gets no `Sources` lookup, and `ZoneTransfer()` skips the name servers it rules out. |
133133
| `Force` | off | Scan a wildcard zone, dropping answers that match its fingerprint. |
134134
| `NoAbort` | off | Keep going when more than a fifth of lookups fail. `Run` still sends the warning as a `KindError` event; `Scan` returns no error for a scan that finished. |
135135
| `Simulate`, `HitRate`, `Seed` | off, `15`, random | Synthetic results with no DNS traffic, for tests and demos. |

‎internal/axfr/axfr.go‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ type Options struct {
3535
// Info receives findings and unexpected failures; Debug receives detail
3636
// worth showing only on request. Nil discards them.
3737
Info, Debug func(format string, args ...any)
38+
// Skip, when set, reports name server hosts that are out of scope
39+
// (-exclude): they are neither resolved nor contacted (#372).
40+
Skip func(host string) bool
3841
}
3942

4043
// Result is what an attempt found.
@@ -107,6 +110,10 @@ func Try(ctx context.Context, target string, o Options) Result {
107110
transferTimeout := max(MinTimeout, o.Timeout)
108111
for _, ns := range servers {
109112
host := strings.ToLower(strings.TrimSuffix(ns.Host, "."))
113+
if o.Skip != nil && o.Skip(host) {
114+
logf(o.Debug, "-axfr: skipping name server %s: it is out of scope", host)
115+
continue
116+
}
110117
lookupCtx, cancel := context.WithTimeout(ctx, o.Timeout)
111118
addrs, err := resolver.LookupHost(lookupCtx, host+".")
112119
cancel()

‎internal/cli/axfr.go‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ type targetAXFR struct {
2323
// zoneTransfer tries a full zone transfer of target from each of its name
2424
// servers, found through the trusted resolver, with the library's shared
2525
// implementation (#314). A resumed run reuses the names the interrupted run
26-
// got, so its candidate list matches.
27-
func zoneTransfer(ctx context.Context, f cliFlags, port, target string, saved *resumeTarget, out *output.Writer) targetAXFR {
26+
// got, so its candidate list matches. Name servers skip rules out of scope
27+
// are neither resolved nor contacted (#372).
28+
func zoneTransfer(ctx context.Context, f cliFlags, port, target string, saved *resumeTarget, out *output.Writer, skip func(string) bool) targetAXFR {
2829
if saved != nil && saved.AXFRDone {
2930
return targetAXFR{names: saved.AXFR, allowed: saved.AXFRServers, denial: dns.Denial(saved.Denial), done: true}
3031
}
@@ -36,6 +37,7 @@ func zoneTransfer(ctx context.Context, f cliFlags, port, target string, saved *r
3637
Port: port,
3738
Timeout: time.Duration(f.timeoutMs) * time.Millisecond,
3839
Info: out.Info,
40+
Skip: skip,
3941
}
4042
if f.verbose {
4143
opts.Debug = out.Info

‎internal/cli/axfr_test.go‎

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ import (
66
"io"
77
"maps"
88
"net"
9+
"net/http"
10+
"net/http/httptest"
911
"os"
1012
"path/filepath"
1113
"slices"
1214
"strconv"
1315
"strings"
16+
"sync/atomic"
1417
"testing"
1518

1619
"golang.org/x/net/dns/dnsmessage"
@@ -315,6 +318,63 @@ func TestE2EZoneTransferSkipsUnresolvableServer(t *testing.T) {
315318
}
316319
}
317320

321+
// TestE2EZoneTransferOutOfScopeTarget covers #372: a target -exclude rules
322+
// out, by name or as a branch, is refused before -axfr or -ct asks anyone
323+
// anything about it.
324+
func TestE2EZoneTransferOutOfScopeTarget(t *testing.T) {
325+
t.Parallel()
326+
var ctHits atomic.Int64
327+
ct := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
328+
ctHits.Add(1)
329+
_, _ = w.Write([]byte("[]"))
330+
}))
331+
defer ct.Close()
332+
wl := writeFile(t, "wl.txt", "www\n")
333+
for _, exclude := range []string{"example.test", "*.example.test"} {
334+
srv := axfrZone(t, true, "")
335+
_, port, err := net.SplitHostPort(srv.Addr)
336+
if err != nil {
337+
t.Fatal(err)
338+
}
339+
code, out := runCLIMergedWith(t, runArgs{axfrPort: port, sourceURLs: map[string]string{"ct": ct.URL + "/"},
340+
args: localArgs("-axfr", "-ct", "-exclude", exclude, "-dns-server", srv.Addr, "-type", "A", "-progress=false", "-w", wl, "example.test")})
341+
if code == exitOK || !strings.Contains(out, "out of scope") {
342+
t.Errorf("-exclude %s: exit %d; want the target refused\n%s", exclude, code, out)
343+
}
344+
if n := srv.Queries(); n != 0 {
345+
t.Errorf("-exclude %s: %d DNS queries for an out-of-scope target, want 0\n%s", exclude, n, out)
346+
}
347+
}
348+
if n := ctHits.Load(); n != 0 {
349+
t.Errorf("-ct was asked %d times about an out-of-scope target, want 0", n)
350+
}
351+
}
352+
353+
// TestE2EZoneTransferSkipsExcludedServer covers #372: a name server -exclude
354+
// rules out is neither resolved nor asked for a transfer; the in-scope one
355+
// still is.
356+
func TestE2EZoneTransferSkipsExcludedServer(t *testing.T) {
357+
t.Parallel()
358+
srv := nsZone(t, map[string][]string{"ns1.example.test": {"127.0.0.1"}, "ns2.corp.example.test": {"127.0.0.1"}},
359+
[]string{"www.example.test", "admin-legacy.example.test"})
360+
wl := writeFile(t, "wl.txt", "www\n")
361+
code, out := runAXFR(t, srv, "-axfr", "-v", "-exclude", "*.corp.example.test", "-dns-server", srv.Addr, "-type", "A", "-progress=false", "-w", wl, "example.test")
362+
if code != exitOK || !strings.Contains(out, "ns1.example.test (127.0.0.1) allowed AXFR") {
363+
t.Fatalf("exit %d; want the transfer from ns1\n%s", code, out)
364+
}
365+
for _, qt := range []dnsmessage.Type{dnsmessage.TypeA, dnsmessage.TypeAAAA} {
366+
if n := srv.QueriesFor("ns2.corp.example.test", qt); n != 0 {
367+
t.Errorf("the excluded name server got %d %v lookups, want 0", n, qt)
368+
}
369+
}
370+
if n := srv.QueriesFor("example.test", dnsmessage.TypeAXFR); n != 1 {
371+
t.Errorf("AXFR queries = %d, want 1 (ns1 only)", n)
372+
}
373+
if !strings.Contains(out, "skipping name server ns2.corp.example.test: it is out of scope") {
374+
t.Errorf("-v does not say the excluded name server was skipped\n%s", out)
375+
}
376+
}
377+
318378
// TestE2EResumeReusesZoneTransfer covers #303: a resumed run scans the names
319379
// the interrupted run's transfer gave and asks no name server again, so its
320380
// candidate list is the one the saved position counts in.
@@ -453,7 +513,7 @@ func TestZoneTransferStopsWhenCancelled(t *testing.T) {
453513
}
454514
out := output.New(nil, false, output.FormatText)
455515
out.SetStderr(io.Discard)
456-
res := zoneTransfer(ctx, cliFlags{timeoutMs: 5000, dnsServer: srv.Addr}, port, "example.test", nil, out)
516+
res := zoneTransfer(ctx, cliFlags{timeoutMs: 5000, dnsServer: srv.Addr}, port, "example.test", nil, out, nil)
457517
if res.tried != 1 {
458518
t.Errorf("addresses asked = %d, want 1: the second came after the cancel", res.tried)
459519
}

‎internal/cli/dryrun.go‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ type dryRunTarget struct {
3232
// preflight check gets it; empty in simulation mode.
3333
Preflight string `json:"preflight,omitempty"`
3434
PreflightOK bool `json:"preflight_ok"`
35+
// OutOfScope is set for a target -exclude rules out: a scan refuses it,
36+
// so it has no candidates and gets no preflight query (#372).
37+
OutOfScope bool `json:"out_of_scope,omitempty"`
3538
}
3639

3740
// dryRun prints what a scan would do without scanning: the candidates per
@@ -45,9 +48,17 @@ func (s *session) dryRun() int {
4548
plans := make([]dryRunTarget, 0, len(s.targets))
4649
failed := false
4750
excluded := scan.Excluder(s.in.excludes)
51+
// The preflights are paced by -rate like a scan's queries (#372).
52+
ctx := dns.WithLimiter(context.Background(), dns.NewRateLimiter(f.rate))
4853
for _, target := range s.targets {
4954
entries, duplicates, skipped := s.words.For(target)
5055
p := dryRunTarget{Domain: target, Duplicates: duplicates, Skipped: skipped, PreflightOK: true}
56+
if scan.TargetOutOfScope(s.in.excludes, target) {
57+
// A scan refuses it before any query, so the plan sends none.
58+
p.OutOfScope = true
59+
plans = append(plans, p)
60+
continue
61+
}
5162
for _, e := range entries {
5263
if len(s.in.excludes) > 0 && excluded(e+"."+target) {
5364
p.Excluded++
@@ -68,7 +79,7 @@ func (s *session) dryRun() int {
6879
}
6980
if !f.testMode {
7081
lookup := dns.Lookup{Resolver: resolver, Timeout: timeout, Attempts: s.in.maxAttempts, Types: s.in.recordTypes}
71-
_, outcome := lookup.Resolve(context.Background(), target)
82+
_, outcome := lookup.Resolve(ctx, target)
7283
p.Preflight = outcome.String()
7384
p.PreflightOK = outcome == dns.OutcomeFound || outcome == dns.OutcomeNXDomain
7485
failed = failed || !p.PreflightOK
@@ -110,6 +121,10 @@ func (s *session) printDryRun(plans []dryRunTarget) {
110121
w := s.a.stdout
111122
for _, p := range plans {
112123
_, _ = fmt.Fprintf(w, "%s\n", p.Domain)
124+
if p.OutOfScope {
125+
_, _ = fmt.Fprintf(w, " out of scope under -exclude: not scanned, no queries\n")
126+
continue
127+
}
113128
_, _ = fmt.Fprintf(w, " candidates %d (%d duplicates removed, %d invalid skipped, %d excluded)\n", p.Candidates, p.Duplicates, p.Skipped, p.Excluded)
114129
_, _ = fmt.Fprintf(w, " queries %d (up to %d with retries)\n", p.Queries, p.QueriesMax)
115130
if p.Seconds > 0 {

‎internal/cli/dryrun_test.go‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"path/filepath"
77
"strings"
88
"testing"
9+
"time"
910

1011
"github.com/TMHSDigital/subenum/internal/dnsserver"
1112
"golang.org/x/net/dns/dnsmessage"
@@ -106,6 +107,48 @@ func TestDryRunPreflight(t *testing.T) {
106107
}
107108
}
108109

110+
// TestDryRunOutOfScopeTarget covers #372: a target -exclude rules out, by
111+
// name or as a branch, is planned as out of scope and its preflight is not
112+
// sent, while the other targets' preflights still are, paced by -rate.
113+
func TestDryRunOutOfScopeTarget(t *testing.T) {
114+
srv, err := dnsserver.Listen(dnsserver.Options{CountNames: true}, func(dnsserver.Query) dnsserver.Reply {
115+
return dnsserver.Reply{A: []string{"192.0.2.1"}}
116+
})
117+
if err != nil {
118+
t.Fatal(err)
119+
}
120+
defer srv.Close()
121+
wl := writeFile(t, "wl.txt", e2eWords)
122+
dl := writeFile(t, "targets.txt", "example.com\nexample.org\nexample.net\nexample.edu\n")
123+
start := time.Now()
124+
code, plans := dryRunPlans(t, "-dns-server", srv.Addr, "-timeout", "10000", "-attempts", "1", "-type", "A",
125+
"-rate", "2", "-exclude", "example.org,*.example.net", "-w", wl, "-dL", dl)
126+
elapsed := time.Since(start)
127+
if code != exitOK || len(plans) != 4 {
128+
t.Fatalf("exit %d, %d plans; want 0 and 4: %+v", code, len(plans), plans)
129+
}
130+
for _, p := range plans {
131+
out := p.Domain == "example.org" || p.Domain == "example.net"
132+
if p.OutOfScope != out || out && (p.Candidates != 0 || p.Queries != 0 || p.Preflight != "") {
133+
t.Errorf("plan %+v: want out_of_scope=%v, and no candidates or preflight when out of scope", p, out)
134+
}
135+
if n := srv.QueriesFor(p.Domain, dnsmessage.TypeA); (n == 0) != out {
136+
t.Errorf("%s: %d preflight queries; want none only when out of scope", p.Domain, n)
137+
}
138+
}
139+
if all := srv.Queries(); all != 2 {
140+
t.Errorf("dry run sent %d queries, want 2 (one preflight per in-scope target)", all)
141+
}
142+
// Two preflights at -rate 2 are half a second apart.
143+
if elapsed < 400*time.Millisecond {
144+
t.Errorf("two preflights at -rate 2 took %s; -rate did not pace them", elapsed)
145+
}
146+
_, stdout := runCLI(t, "", "-dry-run", "-simulate", "-progress=false", "-exclude", "example.com", "-w", wl, "example.com")
147+
if !strings.Contains(stdout, "out of scope under -exclude") || strings.Contains(stdout, "candidates") {
148+
t.Errorf("text plan does not mark the target out of scope:\n%s", stdout)
149+
}
150+
}
151+
109152
func TestDryRunText(t *testing.T) {
110153
wl := writeFile(t, "wl.txt", e2eWords)
111154
code, stdout := runCLI(t, "", "-dry-run", "-simulate", "-progress=false", "-w", wl, "-permute", "example.com")

‎internal/cli/session.go‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -687,18 +687,24 @@ func (s *session) scanOneTarget(ctx context.Context, i int, target string) (next
687687
// every source and the zone transfer (#248).
688688
cands := candidates.New(target, entries, s.seeds)
689689
s.cands, s.foundBy = cands, map[string]int{}
690-
sourceInfo := passiveNames(ctx, s.in.sources, target, saved, out, s.a.sourceURLs)
690+
// A target -exclude rules out is refused by the scan's preflight; it gets
691+
// no passive lookup and no zone transfer before that either (#372).
692+
inScope := !scan.TargetOutOfScope(s.in.excludes, target)
693+
var sourceInfo []targetSource
694+
if inScope {
695+
sourceInfo = passiveNames(ctx, s.in.sources, target, saved, out, s.a.sourceURLs)
696+
}
691697
for _, src := range sourceInfo {
692698
added := cands.Add(src.Source, src.Names)
693699
if src.Fetched {
694700
out.Info("%s", passive.AddedLine(passive.Labels[src.Source], len(src.Names), target, added))
695701
}
696702
}
697703
var axfrInfo targetAXFR
698-
if s.f.axfr {
704+
if s.f.axfr && inScope {
699705
// Transferred names are candidates like -ct's: each is still looked
700706
// up, so only names that resolve are reported (#85).
701-
axfrInfo = zoneTransfer(ctx, s.f, s.a.transferPort(), target, saved, out)
707+
axfrInfo = zoneTransfer(ctx, s.f, s.a.transferPort(), target, saved, out, scan.Excluder(s.in.excludes))
702708
added := cands.Add(candidates.AXFR, axfrInfo.names)
703709
if len(axfrInfo.allowed) > 0 {
704710
out.Info("%s", passive.AddedLine("Zone transfer", len(axfrInfo.names), target, added))

‎internal/scan/runner.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ func Run(ctx context.Context, cfg Config, events chan<- Event) {
835835
func preflight(ctx context.Context, cfg *Config, maxDepth int, events chan<- Event) (wildcardRoot bool, fp *fingerprint, ok, fatal bool) {
836836
// Out-of-scope names are never queried (#87). A target that is itself
837837
// out of scope, or whose every candidate would be, is refused outright.
838-
if cfg.scope.excluded(cfg.Domain) || cfg.scope.subtreeExcluded(cfg.Domain) {
838+
if cfg.scope.targetExcluded(cfg.Domain) {
839839
events <- Event{Kind: EventError, Fatal: true, Message: "refusing to scan " + cfg.Domain + ": it is out of scope ({exclude})"}
840840
return false, nil, false, true
841841
}

0 commit comments

Comments
 (0)