Documentation
¶
Index ¶
- Constants
- func Banner(text string) string
- func Bold(text string) string
- func Count(count int) string
- func DefaultWriter() io.Writer
- func Error(text string) string
- func Highlight(text string) string
- func Host(hostname string) string
- func Info(text string) string
- func Port(port int) string
- func PrintBanner()
- func PrintCSVReport(writer io.Writer, allResults map[string][]scanner.ScanResult, targets []string) error
- func PrintJSONLReport(w io.Writer, target string, targets []string, ...) error
- func PrintJSONReport(w io.Writer, target string, ports []int, targets []string, ...) error
- func PrintScanStart(host string, numPorts int)
- func Service(name string) string
- func State(state string) string
- func StatusError(message string) string
- func StatusOK(message string) string
- func StatusWarn(message string) string
- func Success(text string) string
- func Version(version string) string
- func Warning(text string) string
- type OutputFormatter
Constants ¶
View Source
const ( // Standard colors ColorReset = "\033[0m" ColorBold = "\033[1m" ColorDim = "\033[2m" ColorRed = "\033[31m" ColorGreen = "\033[32m" ColorYellow = "\033[33m" ColorBlue = "\033[34m" ColorMagenta = "\033[35m" ColorCyan = "\033[36m" ColorWhite = "\033[37m" // Bright colors ColorBrightRed = "\033[91m" ColorBrightGreen = "\033[92m" ColorBrightYellow = "\033[93m" ColorBrightBlue = "\033[94m" ColorBrightMagenta = "\033[95m" ColorBrightCyan = "\033[96m" ColorBrightWhite = "\033[97m" // Background colors BgRed = "\033[41m" BgGreen = "\033[42m" BgBlue = "\033[44m" )
ANSI color codes
Variables ¶
This section is empty.
Functions ¶
func DefaultWriter ¶
DefaultWriter returns stdout for output rendering.
func PrintCSVReport ¶
func PrintCSVReport(writer io.Writer, allResults map[string][]scanner.ScanResult, targets []string) error
PrintCSVReport prints one row per open port.
func PrintJSONLReport ¶
func PrintJSONLReport(w io.Writer, target string, targets []string, allResults map[string][]scanner.ScanResult) error
PrintJSONLReport prints one JSON object per open port.
func PrintJSONReport ¶
func PrintJSONReport(w io.Writer, target string, ports []int, targets []string, allResults map[string][]scanner.ScanResult, serviceScan bool, duration time.Duration) error
PrintJSONReport prints the scan results in a machine-friendly JSON document.
func PrintScanStart ¶
PrintScanStart displays the initial scan information
func StatusError ¶
StatusError returns a status message with red error indicator
func StatusWarn ¶
StatusWarn returns a status message with yellow warning indicator
Types ¶
type OutputFormatter ¶
OutputFormatter handles the formatting and display of scan results
func NewOutputFormatter ¶
func NewOutputFormatter(includeServices bool, includeDetails bool) *OutputFormatter
NewOutputFormatter creates a new OutputFormatter instance
func (*OutputFormatter) PrintResults ¶
func (of *OutputFormatter) PrintResults(results []scanner.ScanResult)
PrintResults displays the scan results in a formatted table
Click to show internal directories.
Click to hide internal directories.