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 8575aea
Browse filesBrowse the repository at this point in the historyBrowse files
Add -hosts to look up a list of full host names (#351)
-hosts <file> (or - for stdin) replaces the wordlist with full names,
such as another tool's output, so they go through the same wildcard
filtering, pool, pacing and verdict. Targets still come from <domain>
or -dL: each looks up only the names under it, the most specific target
when targets nest, and names under no target are skipped, counted in
one note. It is refused with -w, -recursive and -tui. The filter sits in
wordlist.Prepared.For, so -dry-run and the resume digests agree with it.
Fixes#351
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
### Added
11
+
-`-hosts <file>` looks up a list of full host names, such as another tool's output or an old results file, instead of a wordlist, through the same wildcard filtering, resolver pool, pacing, verdict, `-diff` and output formats (`-` reads stdin). Targets still come from the `<domain>` argument or `-dL`: each looks up only the names under it, the most specific target when targets nest, and names under no target are out of scope, never queried, and counted in one note. It cannot be combined with `-w`, `-recursive` or `-tui` (#351).
Copy file name to clipboardExpand all lines: README.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
@@ -237,6 +237,7 @@ This table describes `main`, which can be ahead of the latest release: a release
237
237
| :--- | :---: | :--- |
238
238
|**Targets and scope**|||
239
239
|`-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)) |
240
+
|`-hosts <file>`| n/a | File of full host names to look up instead of a wordlist, such as another tool's output; `#` comments allowed; `-` reads stdin. Each target looks up only the names under it (the most specific one, when `-dL` targets nest), through the same wildcard filtering, pacing and verdict as a wordlist scan; names under no target are out of scope, never queried, and counted in one note. Cannot be combined with `-w`, `-recursive` or `-tui`|
240
241
|`-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 |
241
242
|`-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>`; a `TXT` value shows a backslash and non-printable bytes as `\DDD`|
242
243
|`-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 |
Copy file name to clipboardExpand all lines: docs/_includes/flags.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
@@ -17,6 +17,7 @@
17
17
|`-force`| - | Continue scanning even if wildcard DNS is detected |
18
18
|`-format <string>`| text | Output format: text, json, jsonl, or csv |
19
19
|`-hit-rate <int>`| 15 | In simulation mode, percentage of names that resolve (1-100) |
20
+
|`-hosts <file>` {% include unreleased.html flag="hosts" %} | - | A file of full host names to resolve instead of a wordlist, one per line (- for stdin); each target looks up only the names under it, names under no target are skipped |
20
21
|`-inconclusive <string>`| - | Write the names still without an answer (timeout, refused, other) to this file, one per line, to rescan with -w |
21
22
|`-log-format <string>`| text | Diagnostics format on stderr: text, or json for one JSON object per line (level, kind, target, message); results on stdout are unchanged |
22
23
|`-max-duration <duration>`| 0s | Time budget for the whole run, e.g. 20m (0 = unlimited); then no new names are tested, lookups in flight finish, and the run ends with its report, a degraded verdict and saved state for -resume to continue from |
fs.BoolVar(&f.printConfig, "print-config", false, "Print every setting's effective value and its source (flag, env, config or default), then exit")
220
221
fs.BoolVar(&f.dryRun, "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, also sent to each -r pool resolver); then exit")
221
222
fs.Var(&f.wordlists, "w", "Path to a wordlist `file` (- for stdin); repeat to combine several, deduplicated; omitted: the bundled top-5000 list")
223
+
fs.StringVar(&f.hostsFile, "hosts", "", "A `file` of full host names to resolve instead of a wordlist, one per line (- for stdin); each target looks up only the names under it, names under no target are skipped")
222
224
fs.StringVar(&f.domainList, "dL", "", "File of apex domains to scan, one per line (- for stdin); replaces the <domain> argument")
223
225
fs.IntVar(&f.concurrency, "t", scan.DefaultConcurrency, "Number of concurrent workers")
224
226
fs.IntVar(&f.timeoutMs, "timeout", scan.DefaultTimeoutMs, "DNS lookup timeout in milliseconds")
0 commit comments