class OutputBuilder
- OutputBuilder
- Reference
- Object
Direct Known Subclasses
- OutputBuilderAdb
- OutputBuilderCommon
- OutputBuilderCurl
- OutputBuilderDiff
- OutputBuilderHtml
- OutputBuilderHttpie
- OutputBuilderJson
- OutputBuilderJsonl
- OutputBuilderMarkdownTable
- OutputBuilderMermaid
- OutputBuilderOas2
- OutputBuilderOas3
- OutputBuilderOnlyCookie
- OutputBuilderOnlyHeader
- OutputBuilderOnlyParam
- OutputBuilderOnlyTag
- OutputBuilderOnlyUrl
- OutputBuilderPassiveScan
- OutputBuilderPostman
- OutputBuilderPowershell
- OutputBuilderSarif
- OutputBuilderSimctl
- OutputBuilderToml
- OutputBuilderYaml
Defined in:
models/output_builder.crConstant Summary
-
ANSI_ESCAPE =
/\e\[[0-?]*[ -\/]*[@-~]|\e\][^\a\e]*(?:\a|\e\\)|\e[ -\/]*[0-~]/ -
Escape sequences removed on the way into the
-ofile.Colorizeonly ever emits the SGR form (\e[…m), but the text being colorized comes out of the scanned repo, so the pattern covers the rest of the escape space too — a route or param string carrying\e[2J,\e[?1049h,\ecor an OSC-8 hyperlink would otherwise be replayed by the terminal of whoevercats the report. Three alternatives, matched in order: CSI (parameter bytes, intermediate bytes, then a final byte in@–~), OSC (terminated by BEL or ST), and every other escape — optional intermediates and one final byte. CSI and OSC come first so their introducers aren't consumed as a bare two-character escape. -
INLINE_QUERY =
/\?([^?\/#]*=[^?#]*)/ -
A
?in a Noir URL is not always a query separator — it is also route syntax (Express/geo/:ip?, F#/legacy(/?), a regex route/grp/(?:a|b)/(.*)?). Only a?that introduces akey=valuepair before the next path separator opens a query string. Shared by#bake_endpoint, which appends to a URL, and the builders that take one apart, so the two can never disagree about where the route ends. -
ROUTE_AUTHORITY =
/\A[a-z][a-z0-9+.\-]*:\/\/[^\/]*/i -
scheme://authorityat the head of an absolute endpoint URL.
Constructors
Instance Method Summary
-
#analyzer_failures : Array(AnalyzerFailure)
Tech analyzers that raised during the scan being reported.
-
#analyzer_failures=(analyzer_failures : Array(AnalyzerFailure))
Tech analyzers that raised during the scan being reported.
-
#bake_endpoint(url : String, params : Array(Param))
The block form of
NoirLogger#debug, not the String one:#bake_endpointruns once per endpoint for most builders, and the String overload would build all seven of these messages on every call only for the logger to drop them with debug off. - #io : IO
- #io=(io : IO)
- #logger : NoirLogger
- #ob_puts(message)
- #output_file : String
-
#print(endpoints : Array(Endpoint), passive_results : Array(PassiveScanResult))
Two-argument entry point every
-fformat answers to, soNoir::OutputFormats.rendercan hand each builder the same pair.
Constructor Detail
Instance Method Detail
Tech analyzers that raised during the scan being reported. Carried as a
property rather than a third #print argument: only three of the thirty
builders have anywhere to put it, and the other twenty-seven would have
grown a parameter they ignore. Defaults to empty so a builder constructed
directly (specs, library callers) reports a clean scan.
Tech analyzers that raised during the scan being reported. Carried as a
property rather than a third #print argument: only three of the thirty
builders have anywhere to put it, and the other twenty-seven would have
grown a parameter they ignore. Defaults to empty so a builder constructed
directly (specs, library callers) reports a clean scan.
The block form of NoirLogger#debug, not the String one: #bake_endpoint
runs once per endpoint for most builders, and the String overload would
build all seven of these messages on every call only for the logger to
drop them with debug off.
Two-argument entry point every -f format answers to, so
Noir::OutputFormats.render can hand each builder the same pair.
Formats with nothing to say about passive findings inherit this and
implement only print(endpoints).