Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Exit-code and argument-handling leftovers: -r read errors exit 2, wordlist-gen ignores positionals and flags after them

已關閉
#120 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@kragent66-glitch 已經在處理了。

開始於 2026年10月6日。

  • #133 來自 @kragent66-glitch —— 未關閉

評估

難度
4/5
預估耗時
3-5 天
新手友好度
25/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
停滯
技術堆疊
go
領域
cli

研究方向

Read main.go:582-584 and loadPool for the -r exit code, then inspect tools/wordlist-gen.go:156 and the shared argument-parsing helper. Run the existing tests and add cases for the specified file-error codes, positional arguments, invalid flags, and banner validation order. Done means tests pin the expected behavior and wordlist-gen acme.com exits 2 with a hint; linked PR #133 is already open.

由索引模型根據 Issue 內容生成。

描述

area: cli bug good first issue priority: low

Evidence

  • A missing -r file exits 2 (main.go:582-584, loadPool error returns exitUsage). A missing -exclude-file, -dL, -w or -diff file exits 1. The exit-code table from #82 says I/O failures are 1.
  • tools/wordlist-gen.go:156 never checks fs.Args(). wordlist-gen acme.com -o - silently ignores acme.com and the -o - after it (the #29 class of bug), and writes ./wordlist.txt with 38 common entries. An invalid -combine and an empty -o exit 1 rather than 2.
  • UX nits: the SIMULATION banner prints before argument validation (subenum -simulate with no domain shows the banner, then "missing "), and a missing -exclude-file is reported before a missing domain.

Suggested approach

  • Return exitFailure for I/O errors in loadPool and keep 2 for parse errors.
  • In wordlist-gen, use interspersed parsing (same helper as main) and reject positionals with "did you mean -domain?" (exit 2).
  • Validate arguments before printing banners.

Done when

Tests pin each exit code, and wordlist-gen acme.com exits 2 with a hint.

主要語言
Go
星號
1
分支
1
平均合併
5 天 2 小時
30 天內合併 PR
3

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

TMHSDigital/subenum 的其他 Issue

查看 TMHSDigital/subenum 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。