Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa
#120 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@kragent66-glitch ci sta già lavorando.

Dal 6/10/2026.

  • #133 di @kragent66-glitch — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
go
Ambito
cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
1
Fork
1
Merge medio
5g 2h
PR unite (30g)
3

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TMHSDigital/subenum

Tutte le issue di TMHSDigital/subenum

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.