Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng
#120 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@kragent66-glitch đang làm issue này rồi.

Từ ngày 6/10/2026.

  • #133 của @kragent66-glitch — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go
Lĩnh vực
cli

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
1
Fork
1
Merge trung bình
5 ngày 2 giờ
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TMHSDigital/subenum

Tất cả issue của TMHSDigital/subenum

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.