-permute and -dry-run gaps: seeds-only pass, custom words, resolver pool
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- go
- 領域
- cli, networking
研究方向
Read the relevant entry points in internal/cli/cli.go, wordlist.go, permute.go, and dryrun.go, then trace permutation generation through internal/candidates/candidates.go and internal/permute/permute.go. Start with docs/DEVELOPER_GUIDE.md and run go test ./... using only simulated or lab DNS. Done means all three gaps meet the acceptance criteria, including resolver pool estimates and preflight output.
由索引模型根據 Issue 內容生成。
描述
Summary
Three smaller gaps in -permute and -dry-run.
1. -permute cannot run from -seeds alone; a permute-only pass needs a throwaway main scan
- Where:
internal/cli/cli.go:262,internal/cli/wordlist.go:56-76,internal/cli/permute.go:65-84 - What happens:
-seeds"implies -permute" (cli.go:262), but the permutation pass only runs after a main pass over the wordlist; omitting-wselects the bundled 5000-entry list (wordlist.go:58-62), and an empty-wfile is refused. Verified with the built binary:subenum -simulate -seed 1 -w empty.txt -seeds seeds.txt lab.exampleexits 1 withError: wordlist empty.txt has no valid entries. Issue search for "permute only", "permute-only", "skip the main", "without the main": no hits; #72 (the -permute feature) does not cover it. - Impact: The second-stage workflow #72 targets (earlier results in, alterations out) costs a full bundled-wordlist scan of the target each time (10,000 extra queries with the default types), or a hand-made one-line dummy wordlist that still queries that name.
- To see it: As above.
- Suggested fix: When
-seedsis given with an explicit "no wordlist" (-w ""already means "bundled", so a new value such as-w noneor a-permute-onlyflag), skip the main pass and runrunPermutationPasswithfoundempty and the seeds as the only input. Make-dry-runcount the permutation candidates in this mode, since they are known without a scan.
2. -permute uses a fixed 30-word list; the CLI cannot pass the custom words the library accepts
- Where:
internal/permute/permute.go:16-21,internal/candidates/candidates.go:164,pkg/subenum/subenum.go:449-458 - What happens:
candidates.Permutationsalways callspermute.Generate(rel, permute.Words, skip)(candidates.go:164), andpermute.Wordsis a hard-coded list of 30 environment/role names (permute.go:16-21). The public library already takes custom words (subenum.Permutations(seeds, words), nil = built-in, subenum.go:449-458), so the CLI is the only surface without the option. Labels the scan itself discovered (for examplepaymentsinpayments.example.com) are never combined with other seeds. Issue search for "permute-words", "permutation words", "custom words": no hits. - Impact: Permutation hit rates depend on an organisation's own naming (
-eu1,-k8s, product names); users who know them have to switch to an external alteration tool and lose subenum's guarded second pass. - Suggested fix: Add
-permute-words <file>(one word per line,#comments, same normalisation as wordlists), merged with the built-in list or replacing it (-permute-words-only, mirroring-takeover-providers-only), threaded throughcandidates.Permutations. Optionally add the distinct leftmost labels of the main pass's hits to the word set (capped). Record the words file in the resume input fingerprint, as the wordlist is, so a resumed permute pass rebuilds the same candidates.
3. -dry-run ignores the resolver pool: no per-resolver preflight, and -rate-per-resolver is not in the duration
- Where:
internal/cli/dryrun.go:40-76,internal/cli/dryrun.go:115-119,internal/cli/session.go:109-114,internal/cli/cli.go:268 - What happens:
loadInputsbuildss.in.poolfrom-rbeforedryRunruns (session.go:109-114), butdryRunnever reads it. The preflight goes only tof.dnsServer(dryrun.go:43, :70-71), and the duration estimate uses onlyf.rate(dryrun.go:65-68); with-r pool.txt -rate-per-resolver 20and no-rate, which the help explicitly allows ("-rate still caps the total (0 = unlimited)", cli.go:268), the plan printsduration not bounded by -rate (unlimited)(dryrun.go:118) although the scan is capped at 20 x pool size queries/s. - Impact: The users who most need a plan before a big run, those using a resolver pool for a large wordlist, get a duration line that says "unlimited" and learn only mid-scan that part of their pool times out or is benched. Lab users are unaffected.
- To see it: Reasoned from code (a live pool cannot be exercised hermetically here):
subenum -dry-run -r pool.txt -rate-per-resolver 20 -w big.txt example.comprints the unlimited duration line and one preflight line for 8.8.8.8:53. - Suggested fix: When
s.in.pool != nil, compute the effective rate asmin(rate, ratePerRes * pool.Size())(either term 0 meaning no bound) for the estimate, and say which flag bounds it. Add one preflight per pool member (one query each, the same kind of traffic the dry run already sends) and print a per-resolver ok/failed line. Keep the JSON plan in step (pool_preflightarray,rate_effective).
Acceptance criteria
- -permute cannot run from -seeds alone; a permute-only pass needs a throwaway main scan
- -permute uses a fixed 30-word list; the CLI cannot pass the custom words the library accepts
- -dry-run ignores the resolver pool: no per-resolver preflight, and -rate-per-resolver is not in the duration
Related: #72
Getting started
- Relevant files:
internal/cli/cli.go,internal/cli/wordlist.go,internal/cli/permute.go,internal/permute/permute.go,internal/candidates/candidates.go,pkg/subenum/subenum.go - How to run tests:
go test ./...(tests must stay hermetic: use-simulate, a lab zone orinternal/dnstest, never a live domain) - Related docs:
docs/DEVELOPER_GUIDE.md,docs/ARCHITECTURE.md
Filed by repo-audit/full-audit at 0f3b0b6. Severity: low. Effort: M. audit-key: enhancement|internal/cli/permute.go|permute-dryrun-gaps
- 主要語言
- Go
- 星號
- 1
- 分支
- 1
- 平均合併
- 8 小時 3 分鐘
- 30 天內合併 PR
- 31
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TMHSDigital/subenum 的其他 Issue
-
Resumed -follow-records hits come back with source wordlist可能已有人在做 @bfs2021 今天認領。 未關閉area: cli bug good first issue severity: low
難度 2/5 1-3 小時 新手友好度 35/100
TMHSDigital/subenum#441 ·
維護者通常 1 天內回覆
-
enhancement severity: low
難度 4/5 3-5 天 新手友好度 55/100
TMHSDigital/subenum#416 ·
維護者通常 1 天內回覆
-
community marketing priority: low
難度 5/5 一週以上 新手友好度 35/100
TMHSDigital/subenum#132 · 1 則留言 ·
維護者通常 1 天內回覆
-
documentation marketing priority: medium
難度 5/5 一週以上 新手友好度 25/100
TMHSDigital/subenum#127 ·
維護者通常 1 天內回覆
-
ci feature marketing priority: medium
難度 5/5 一週以上 新手友好度 35/100
TMHSDigital/subenum#126 · 1 則留言 ·
維護者通常 1 天內回覆
查看 TMHSDigital/subenum 的全部 Issue
相似的 Issue
-
add CLI flag to hide animation可能已有人在做 @prdai 今天認領。 未關閉feature request
難度 2/5 1-3 小時 新手友好度 60/100
維護者通常 1 天內回覆
-
Expose session state keys on the Go todo and agent-mode providers可能已有人在做 @gabisonia 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
microsoft/agent-framework-go#1412 ·
維護者通常 1 天內回覆
-
area:webapp bug finding
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
flaky-test
難度 1/5 1 小時以內 新手友好度 88/100
維護者通常 1 天內回覆
-
kind/cleanup
難度 2/5 1-3 小時 新手友好度 82/100
kubernetes-sigs/kueue#19279 ·
維護者通常 1 天內回覆