Documentation
¶
Index ¶
- Variables
- func ArtifactResultID(tool, kind, target string, data any) string
- func BoolFlagEnabled(args []string, long string) bool
- func GoFlagsHelp(name string, data any) string
- func HasFlag(args []string, long string) bool
- func NewGoFlagsParser(name string, data any) *goflags.Parser
- func NormalizeFlags(args []string, known map[string]struct{}, aliases map[string]string) []string
- func ResolveRelativePaths(args []string, fileFlags map[string]bool, workDir string) []string
- type Base
- func (b *Base) EmitArtifactCtx(ctx context.Context, tool, kind, target string, data any)
- func (b *Base) EmitArtifactResultCtx(ctx context.Context, resultID, tool, kind, target string, data any)
- func (b *Base) EmitLootCtx(ctx context.Context, ...)
- func (b *Base) InitLogger(logger telemetry.Logger)
- func (b *Base) SetProxy(proxy string)
- func (b *Base) SetWorkDir(dir string)
Constants ¶
This section is empty.
Variables ¶
View Source
var CommonAliases = map[string]string{
"-etags": "-exclude-tags",
"-eid": "-exclude-id",
"-es": "-exclude-severity",
"-tl": "-template-list",
}
CommonAliases defines nuclei-style short flag aliases shared across tools.
Functions ¶
func ArtifactResultID ¶
ArtifactResultID returns a stable identity for one scanner-native record. The same value is carried by its aop.tool.Loot marker.
func BoolFlagEnabled ¶
func GoFlagsHelp ¶
GoFlagsHelp renders help directly from go-flags struct tags.
func NewGoFlagsParser ¶
NewGoFlagsParser returns the parser shared by a scanner's runtime argument handling and generated help. Keeping both paths on the same options struct prevents the CLI documentation from drifting away from accepted flags.
func NormalizeFlags ¶
NormalizeFlags converts single-dash flags to double-dash when they match a known flag, and applies alias mappings. Unknown flags pass through.
Types ¶
type Base ¶
func (*Base) EmitArtifactCtx ¶
func (*Base) EmitArtifactResultCtx ¶
func (*Base) EmitLootCtx ¶
func (*Base) InitLogger ¶
func (*Base) SetWorkDir ¶
Click to show internal directories.
Click to hide internal directories.