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 05d51b5
Browse filesBrowse the repository at this point in the historyBrowse files
internal/permute generates candidates from found names: built-in
environment and role words joined with - on either side or as a new
level (api-dev, dev-api, dev.api), and number increments (api2 ->
api1, api3, api4; widths kept). -permute runs a second, fully guarded
scan per target over them (preflight, wildcard filtering, -rate,
-max-queries, -exclude), skipping wordlist entries; -seeds adds seeds
from an earlier results file in any format and implies -permute.
Permutation hits carry "permutation": true in JSON/JSONL, and the
run-quality report gains per-target seeds, candidates, hits and the
pass's verdict. E2E: a found api.example.com finds a planted
api-dev.example.com that is not in the wordlist.
Fixes#72
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
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
## [Unreleased]
9
9
10
10
### Added
11
+
- Permutation mode: `-permute` follows each target's scan with a second pass over permutations of the names found (word joins such as `api-dev`, `dev-api` and `dev.api`, and number increments), and `-seeds <file>` adds seeds from an earlier run in any format. The pass is fully guarded (preflight, wildcard filtering, `-rate`, `-max-queries`, `-exclude`), skips wordlist entries, marks its hits `"permutation": true`, and reports seeds, candidates and hits in the run-quality report (#72).
11
12
- Defaults from a config file and the environment: `config.json` in the user config directory (or `$SUBENUM_CONFIG`) and `SUBENUM_<FLAG>` variables, with precedence flag > env > config > built-in. `-print-config` shows each effective setting and its source. `subenum completion bash|zsh|fish|powershell` and `subenum man` generate shell completions and a man page from the flags, and release archives ship them (#88).
12
13
- A useful default wordlist: `-w` is now optional. Without it, subenum uses an embedded list of the 5,000 most common subdomain labels (SecLists `subdomains-top1million-5000.txt`, MIT; the license notice is kept in `data/subdomains-5k.txt`) and says so on stderr. The README gains a "Choosing a wordlist" section on larger lists and their query cost (#63).
13
14
- Monitoring mode: `-diff previous` compares with an earlier results file (any format) and prints only names added (`+` / `"change": "added"`) or removed (`-` / `"removed"`), with a `change` CSV column; exit code `4` signals changes. The `-o` file keeps the full current results for the next run. Removals are reported only when the run's verdict is `complete`, and never for `-exclude`d names. The run-quality report gains a `diff` object, and `docs/monitoring.md` has a scheduled GitHub Actions workflow that opens an issue for new names (#84).
Copy file name to clipboardExpand all lines: README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -392,6 +392,16 @@ Results can only be as good as the wordlist. Without `-w`, subenum uses its bund
392
392
393
393
List size sets the query volume: each entry costs one query per record type (two with the default `A,AAAA`), per attempt, per recursion level. A 1M-entry list at `-rate 500` is about 70 minutes of wire time per target, so pair big lists with `-rate` (and `-r` for a resolver pool), and use `-max-queries` as a budget. `tools/wordlist-gen` builds a small target-specific list from a domain's own terms.
394
394
395
+
### Permutations: a second pass
396
+
397
+
Once `api.example.com` and `dev.example.com` exist, the next names most likely to exist are `api-dev`, `dev-api`, `dev.api` and `api2`. `-permute` runs a second scan per target over permutations of the names the first pass found: built-in environment and role words (`dev`, `staging`, `prod`, `qa`, `internal`, `v1`, ...) joined with `-` on either side or as a new level, plus number increments (`api2` -> `api1`, `api3`, `api4`). `-seeds results.jsonl` adds names from an earlier run (any format) and implies `-permute`.
398
+
399
+
The pass is a normal scan with the same preflight, wildcard filtering, `-rate`, `-max-queries` and `-exclude`; candidates already in the wordlist are skipped. Its hits carry `"permutation": true` in JSON/JSONL, and the run-quality report shows the seeds, candidates and hits per target.
`-diff previous.jsonl` reports only what changed since an earlier run: `+ name` for new subdomains and `- name` for ones that disappeared (only when the run's verdict is `complete`, so failed lookups are never mistaken for removals). The `-o` file keeps the full current results for the next comparison, and the exit code is `4` when anything changed. [docs/monitoring.md](docs/monitoring.md) has a ready-to-use scheduled GitHub Actions workflow that opens an issue when new names appear.
Copy file name to clipboardExpand all lines: docs/_includes/flags.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,15 @@
15
15
| `-max-queries <int>` | - | Max candidate names to test (0 = unlimited); each name sends one query per record type, per attempt |
16
16
| `-no-abort` | - | Do not abort when the resolver failure rate exceeds 20% (warning is still emitted) |
17
17
| `-o <string>` | - | Write results to file (in addition to stdout) |
18
+
| `-permute` | - | After each scan, scan permutations of the names found (api -> api-dev, dev-api, dev.api, api2, ...) |
18
19
| `-print-config` | - | Print every setting's effective value and its source (flag, env, config or default), then exit |
19
20
| `-progress` | true | Show progress during scanning |
20
21
| `-r <string>` | - | File of resolvers (ip or ip:port, one per line) to spread queries over; every hit is re-validated against -dns-server |
21
22
| `-rate <int>` | - | Max DNS queries per second on the wire, all workers combined; counts every record type, retry and wildcard probe (0 = unlimited) |
fs.StringVar(&f.diff, "diff", "", "Previous results file (any -format); report only names added or removed since then, and exit 4 when there are changes")
189
193
fs.StringVar(&f.resolvers, "r", "", "File of resolvers (ip or ip:port, one per line) to spread queries over; every hit is re-validated against -dns-server")
0 commit comments