Documentation
¶
Index ¶
- Constants
- func AssetDataInt(data map[string]any, key string) int
- func AssetDataString(data map[string]any, key string) string
- func AssetDataStrings(data map[string]any, key string) []string
- func AssetItemDetail(item AssetItem) string
- func BuildTimelineMarkdown(entries []TimelineEntry) string
- func CompactStrings(values ...string) []string
- func ExtractQuotedMarkdown(raw string) string
- func ExtractQuotedSummary(raw string) string
- func FirstNonEmpty(values ...string) string
- func FormatAssetReport(result *Result, color bool) string
- func FormatLine(prefix, body string, color Color) string
- func HasTag(tags []string, tag string) bool
- func OutputPrefix(source string, colorFn func(string) string) string
- func ParseRecordData[T any](r Record) (T, error)
- func RenderFile(path, format, outputPath string) error
- func RenderTimeline(w io.Writer, entries []TimelineEntry) error
- func RenderTimelineMarkdown(w io.Writer, entries []TimelineEntry) error
- func SanitizeLine(line string, color Color) string
- func StripANSI(s string) string
- func TruncateStr(s string, maxLen int) string
- func WebPath(rawURL string) string
- type AgentEvent
- type AgentEventMsg
- type AgentEventUsage
- type Asset
- type AssetItem
- type Color
- func (c Color) Blue(s string) string
- func (c Color) Bold(s string) string
- func (c Color) Code(code string) string
- func (c Color) Cyan(s string) string
- func (c Color) Dim(s string) string
- func (c Color) ForPriority(p string) func(string) string
- func (c Color) ForStatus(status string) func(string) string
- func (c Color) Green(s string) string
- func (c Color) GreenBold(s string) string
- func (c Color) Magenta(s string) string
- func (c Color) Red(s string) string
- func (c Color) RedBold(s string) string
- func (c Color) Status(s string) string
- func (c Color) Wrap(s, code string) string
- func (c Color) Yellow(s string) string
- func (c Color) YellowBold(s string) string
- type Error
- type Loot
- type Record
- type RecordType
- type Result
- type ScanEnd
- type ScanStart
- type Summary
- type TimelineEntry
- type TimelineWriter
Constants ¶
View Source
const ( ANSIReset = "\033[0m" ANSIBold = "\033[1m" ANSIDim = "\033[2m" ANSIRed = "\033[31m" ANSIGreen = "\033[32m" ANSIYellow = "\033[33m" ANSIBlue = "\033[34m" ANSIMagenta = "\033[35m" ANSICyan = "\033[36m" )
View Source
const ( LootFingerprint = "fingerprint" LootWeakpass = "weakpass" LootVuln = "vuln" )
View Source
const ( AssetItemService = "service" AssetItemPath = "path" AssetItemFingerprint = "fingerprint" AssetItemLoot = "loot" AssetItemNote = "note" AssetItemResponse = "response" AssetItemError = "error" )
Variables ¶
This section is empty.
Functions ¶
func AssetItemDetail ¶
func BuildTimelineMarkdown ¶
func BuildTimelineMarkdown(entries []TimelineEntry) string
func CompactStrings ¶
func ExtractQuotedMarkdown ¶
func ExtractQuotedSummary ¶
func FirstNonEmpty ¶
func FormatAssetReport ¶
func FormatLine ¶
func ParseRecordData ¶
func RenderFile ¶
func RenderTimeline ¶
func RenderTimeline(w io.Writer, entries []TimelineEntry) error
func RenderTimelineMarkdown ¶
func RenderTimelineMarkdown(w io.Writer, entries []TimelineEntry) error
func SanitizeLine ¶
func TruncateStr ¶
Types ¶
type AgentEvent ¶
type AgentEvent struct {
Type string `json:"type"`
SessionID string `json:"session_id"`
ParentSessionID string `json:"parent_session_id"`
Turn int `json:"turn"`
ToolCallID string `json:"tool_call_id"`
ToolName string `json:"tool_name"`
Arguments string `json:"arguments"`
Result string `json:"result"`
IsError bool `json:"is_error"`
Error string `json:"error"`
Stop string `json:"stop"`
Message *AgentEventMsg `json:"message"`
ToolResults []AgentEventMsg `json:"tool_results"`
Usage *AgentEventUsage `json:"usage"`
ContextTokens int `json:"context_tokens"`
NewMessages int `json:"new_messages"`
RequestModel string `json:"request_model"`
RequestMessages int `json:"request_messages"`
RequestTools int `json:"request_tools"`
}
type AgentEventMsg ¶
type AgentEventUsage ¶
type AssetItem ¶
type AssetItem struct {
Kind string `json:"kind"`
Source string `json:"source,omitempty"`
Target string `json:"target,omitempty"`
Status string `json:"status,omitempty"`
Title string `json:"title,omitempty"`
Summary string `json:"summary,omitempty"`
Detail string `json:"detail,omitempty"`
Tags []string `json:"tags,omitempty"`
Data map[string]any `json:"data,omitempty"`
Raw string `json:"raw,omitempty"`
}
type Loot ¶
type Loot struct {
Kind string `json:"kind"`
Target string `json:"target"`
Priority string `json:"priority"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
Data map[string]any `json:"data,omitempty"`
}
Loot represents a valuable scan output — a confirmed vulnerability, compromised credential, identified technology stack, or other security-relevant discovery.
type Record ¶
type Record struct {
Type RecordType `json:"type"`
Timestamp time.Time `json:"ts"`
Loot bool `json:"loot,omitempty"`
Data json.RawMessage `json:"data"`
}
func NewLootRecord ¶
func NewLootRecord(t RecordType, data interface{}) Record
func NewRecord ¶
func NewRecord(t RecordType, data interface{}) Record
func ParseRecord ¶
func ParseRecordFile ¶
type RecordType ¶
type RecordType string
const ( TypeScanStart RecordType = "scan_start" TypeGogo RecordType = "gogo" TypeSpray RecordType = "spray" TypeZombie RecordType = "zombie" TypeNeutron RecordType = "neutron" TypeAgent RecordType = "agent" TypeScanEnd RecordType = "scan_end" )
type Result ¶
type Result struct {
Summary Summary `json:"summary"`
Assets []Asset `json:"assets,omitempty"`
Services []*parsers.GOGOResult `json:"services,omitempty"`
WebProbes []*parsers.SprayResult `json:"web_probes,omitempty"`
Loots []Loot `json:"loots,omitempty"`
Errors []Error `json:"errors,omitempty"`
}
func RecordsToResult ¶
RecordsToResult converts parsed records into a Result for asset report rendering.
type Summary ¶
type Summary struct {
Targets int `json:"targets"`
Services int `json:"services"`
Webs int `json:"webs"`
Probes int `json:"probes"`
Loots int `json:"loots"`
Errors int `json:"errors"`
Tasks int64 `json:"tasks"`
Requests int64 `json:"requests"`
Duration string `json:"duration"`
StartedAt time.Time `json:"started_at,omitempty"`
FinishedAt time.Time `json:"finished_at,omitempty"`
}
type TimelineEntry ¶
func ParseTimelineFile ¶
func ParseTimelineFile(path string) ([]TimelineEntry, error)
type TimelineWriter ¶
type TimelineWriter struct {
// contains filtered or unexported fields
}
TimelineWriter writes Record entries to a single JSONL file.
func NewTimelineWriter ¶
func NewTimelineWriter(path string) (*TimelineWriter, error)
func (*TimelineWriter) Close ¶
func (w *TimelineWriter) Close() error
func (*TimelineWriter) WriteRecord ¶
func (w *TimelineWriter) WriteRecord(rec Record)
Click to show internal directories.
Click to hide internal directories.