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
Exit-code and argument-handling leftovers: -r read errors exit 2, wordlist-gen ignores positionals and flags after them #120
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.
I verified each item against HEAD (de87d846) before starting, and the first two are already satisfied there:
-r exit code is already 1. A missing -r file now returns exitFailure (main.go:345-349, loadPool) — subenum -r /nonexistent example.com exits 1. Only the parse path (main.go:354-357) still returns exitUsage (2), which is the intended split.
Validation already runs before the banner.validateFlags is called before the SIMULATION banner block (main.go:601-616), so subenum -simulate with no domain prints "missing " first, not the banner.
Still reproducing the wordlist-gen half on HEAD:
tools/wordlist-gen.go:156 calls fs.Parse directly, which stops at the first positional. wordlist-gen acme.com -o /tmp/out.txt exits 0, silently ignores both acme.com and the -o after it, and writes ./wordlist.txt (38 common entries).
An invalid -combine value and an empty -o both exit 1 instead of 2.
I'll open a PR that gives wordlist-gen the same interspersed parsing as main.go, rejects leftover positionals with a -domain hint (exit 2), returns exitUsage for the invalid -combine/empty -o cases, and pins each exit code with tests.
Done on main: unreadable -r exits 1 (9a0df31), usage errors print before the simulation banner, and a missing domain is reported before a missing -exclude-file (b39fdc0). The wordlist-gen positional-argument part is in community PR #133, so this stays open until that lands.
Activity
fix(cli): lab mode honours env/config resolvers; config precedence fixes
kragent66-glitch commentedon Oct 6, 2026
Hi — I'd like to pick this up.
I verified each item against HEAD (
de87d846) before starting, and the first two are already satisfied there:-rexit code is already 1. A missing-rfile now returnsexitFailure(main.go:345-349,loadPool) —subenum -r /nonexistent example.comexits 1. Only the parse path (main.go:354-357) still returnsexitUsage(2), which is the intended split.validateFlagsis called before the SIMULATION banner block (main.go:601-616), sosubenum -simulatewith no domain prints "missing " first, not the banner.Still reproducing the wordlist-gen half on HEAD:
tools/wordlist-gen.go:156callsfs.Parsedirectly, which stops at the first positional.wordlist-gen acme.com -o /tmp/out.txtexits 0, silently ignores bothacme.comand the-oafter it, and writes./wordlist.txt(38 common entries).-combinevalue and an empty-oboth exit 1 instead of 2.I'll open a PR that gives wordlist-gen the same interspersed parsing as
main.go, rejects leftover positionals with a-domainhint (exit 2), returnsexitUsagefor the invalid-combine/empty-ocases, and pins each exit code with tests.fix(cli): report a missing domain before reading -exclude-file
TMHSDigital commentedon Oct 6, 2026
Done on main: unreadable
-rexits 1 (9a0df31), usage errors print before the simulation banner, and a missing domain is reported before a missing-exclude-file(b39fdc0). Thewordlist-genpositional-argument part is in community PR #133, so this stays open until that lands.fix(wordlist-gen): parse flags interspersed and reject positionals (#133