webserver

package
v0.0.36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package webserver contains the logic and data structures necessary for the `webcan probe` command

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine added in v0.0.31

type Engine struct {
	Library       Module
	Config        *webscan.WebServerTypeConfig
	ApacheModules map[webscan.ProbeType]map[webscan.ModuleName]Module
	NginxModules  map[webscan.ProbeType]map[webscan.ModuleName]Module
}

func NewEngine added in v0.0.31

func NewEngine(config *webscan.WebServerTypeConfig) *Engine

func (*Engine) GetModules added in v0.0.31

func (e *Engine) GetModules() ([]Module, error)

func (*Engine) Launch added in v0.0.31

func (e *Engine) Launch(ctx context.Context) (*webscan.WebServerReport, error)

func (*Engine) Run added in v0.0.31

func (e *Engine) Run(ctx context.Context, target string) (*webscan.Attempt, []string)

type Module added in v0.0.31

type Module interface {
	ModuleRun(target string, config *webscan.WebServerTypeConfig) (*webscan.Attempt, []string)
	AnalyzeResponse(response *webscan.ResponseUnion) bool
}

type ProbeReport

type ProbeReport struct {
	Targets []string     `json:"targets" yaml:"targets"`
	URLs    []URLDetails `json:"urls" yaml:"urls"`
	Errors  []string     `json:"errors" yaml:"errors"`
}

A ProbeReport represents a holistic report of all the URLs that were probed during a web server probe operation,

func PerformWebServerProbe

func PerformWebServerProbe(ctx context.Context, targets string, timeout time.Duration) (ProbeReport, error)

PerformWebServerProbe performs a web server probe against the provided targets, returning a ProbeReport with the results of the probe.

type URLDetails

type URLDetails struct {
	URL    string `json:"url" yaml:"url"`
	Status int    `json:"status" yaml:"status"`
	Title  string `json:"title" yaml:"title"`
}

URLDetails represents the data returned from a probe of a singular URL.

Directories

Path Synopsis
enumerate
validate

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL