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
Commit 55c554a
Browse filesBrowse the repository at this point in the historyBrowse files
Let the scan engine say whether a scan failed (#308)
The CLI, the library, the MCP server and the TUI each worked out from
the event stream whether a scan had failed, with their own rules for
-no-abort warnings and cancellation.
scan.Event gains Fatal (on EventError; false only for the -no-abort
reliability warning) and Failed (on EventDone; true after a fatal
preflight error or a reliability abort, false when cancelled), and
pkg/subenum carries both. The four consumers now read them instead of
re-deriving the answer. Output is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #308
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
## [Unreleased]
9
9
10
10
### Added
11
+
- Library: a `KindError` event has `Fatal` set when it ends the scan (the reliability guard's warning under `NoAbort` is the one error without it), and `KindDone` has `Failed` set when the scan failed. The CLI, the TUI, `Scan` and `subenum mcp` now read these instead of each working it out from the errors seen and the no-abort setting; exit codes, `Scan` errors and verdicts are unchanged (#308).
11
12
- The TUI configuration form includes **Sources** and **Permute** fields for `-sources` and `-permute`. The passive sources named in Sources (`ct`, `wayback`) are asked while the wordlist loads and their names are scanned with the wordlist's; a source that fails is a warning on the scan screen, and none is asked with Simulate on. With Permute on, a permutation pass follows the scan on the same screen, and the finished screen's verdict and counters cover both passes. With either field set, the results file names what proposed each result (`sources`, and `permutation` for a permutation hit) and its summary has the `sources` and `permutation` entries the CLI's report has (#274).
12
13
- Each result says what proposed it: a `sources` list in JSON and JSONL and a last `sources` column in CSV (joined with `;`), holding `wordlist`, `ct`, `wayback` and `axfr`, every one that had the name, or `permute` alone for a `-permute` hit. A name found by `-recursive` below another is the wordlist's. The run-quality report counts the results each passive source had proposed (`found` in its `sources` entry) and a zone transfer's (`axfr_found`). Text output, the TUI's files and `subenum mcp` reports are unchanged (#273).
13
14
-`subenum mcp`: `scan` and `lab_scan` accept an `offset` that skips that many candidates at the start of the word list (after dedupe), and a report whose `max_queries` left words untested carries `next_offset`, named in its `reason`. An agent can now work through the bundled 5,000-label list in several calls instead of testing the same first `-max-queries` names each time; every call stays within `-max-queries`, `-max-duration` and `-max-calls` (#313).
Copy file name to clipboardExpand all lines: docs/library.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ for ev := range events {
59
59
}
60
60
```
61
61
62
-
Read the channel until it closes, or cancel `ctx`. Breaking out of the loop with a deferred `cancel()` is safe: once `ctx` is cancelled the scan stops without waiting for a reader, and its goroutines exit within about a second whether or not the channel is read. A consumer that keeps reading after cancelling still gets `KindDone` with the counts so far. While `ctx` is live, a consumer that stops reading pauses the scan once the buffer fills.
62
+
Read the channel until it closes, or cancel `ctx`. Breaking out of the loop with a deferred `cancel()` is safe: once `ctx` is cancelled the scan stops without waiting for a reader, and its goroutines exit within about a second whether or not the channel is read. A consumer that keeps reading after cancelling still gets `KindDone` with the counts so far. A `KindError` event has `Fatal` set when it ends the scan (the `NoAbort` warning is the one that does not), and `KindDone` has `Failed` set when the scan failed, so a consumer does not have to work either out. While `ctx` is live, a consumer that stops reading pauses the scan once the buffer fills.
returnfalse, nil, false// interrupted during wildcard probes
779
+
returnfalse, nil, false, false// interrupted during wildcard probes
768
780
}
769
781
// An inconclusive check is never "no wildcard": under a real wildcard
770
782
// every candidate would resolve and flood the results (#47). -force
771
783
// scans anyway, but without a fingerprint to filter with.
772
784
iferr!=nil&&!cfg.Force {
773
-
events<-Event{Kind: EventError, Message: "wildcard detection failed: "+err.Error() +"; results could not be filtered. Use {force} to scan anyway."}
774
-
returnfalse, nil, false
785
+
events<-Event{Kind: EventError, Fatal: true, Message: "wildcard detection failed: "+err.Error() +"; results could not be filtered. Use {force} to scan anyway."}
786
+
returnfalse, nil, false, true
775
787
}
776
788
iferr!=nil {
777
789
events<-Event{Kind: EventNotice, Notice: NoticeWildcard, Message: "WARNING: wildcard detection failed ("+err.Error() +"); scanning without wildcard filtering because of {force}"}
0 commit comments