You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c7b693f
Browse filesBrowse the repository at this point in the historyBrowse files
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>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
71
71
- 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).
72
72
73
73
### 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).
74
75
- 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).
75
76
- 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).
76
77
- 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).
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -238,7 +238,7 @@ This table describes `main`, which can be ahead of the latest release: a release
238
238
|`-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)) |
239
239
|`-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 |
240
240
|`-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|
242
242
|`-exclude-file <file>`| n/a | Same patterns, one per line (`#` comments allowed), e.g. a bug-bounty program's out-of-scope list |
243
243
|**Finding more names**|||
244
244
|`-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
290
290
|`-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)|
291
291
|**Modes**|||
292
292
|`-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`|
294
294
|`-print-config`|`false`| Print every setting's effective value and source (`flag`, env, config or default), then exit |
Copy file name to clipboardExpand all lines: docs/library.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ These queries go to the domain's own name servers, not to `Resolver`, and they a
129
129
|`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. |
130
130
|`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. |
131
131
|`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. |
133
133
|`Force`| off | Scan a wildcard zone, dropping answers that match its fingerprint. |
134
134
|`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. |
135
135
|`Simulate`, `HitRate`, `Seed`| off, `15`, random | Synthetic results with no DNS traffic, for tests and demos. |
0 commit comments