cmd

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package cmd implements the CobraCLI commands for the webscan CLI. Subcommands for the CLI should all live within this package. Logic should be delegated to internal packages and functions to keep the CLI commands clean and focused on CLI I/O.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebScan

type WebScan struct {
	Version      string
	RootFlags    config.RootFlags
	OutputConfig writer.OutputConfig
	OutputSignal signal.Signal
	RootCmd      *cobra.Command
	VersionCmd   *cobra.Command
	FuzzCmd      *cobra.Command
	ProbeCmd     *cobra.Command
	SpiderCmd    *cobra.Command
	VulnCmd      *cobra.Command
	AppCmd       *cobra.Command
}

WebScan is the main struct for the webscan CLI. It contains both the root command and all subcommands that can be invoked during the execution of the CLI. It also is responsible for managing the output configuration as well as the output signal itself, which will be written after the execution of the invoked command's Run function.

func NewWebScan

func NewWebScan(version string) *WebScan

NewWebScan creates a new WebScan struct with the provided version string. The Webscan struct is used throughout the subcommands as a contex within which output results and configuration values can be stored. We pass the version value in from the main.go file, where we set the version string during the build process.

func (*WebScan) InitAppCommand added in v0.0.9

func (a *WebScan) InitAppCommand()

InitAppCommand initializes the app command for the webscan CLI.

func (*WebScan) InitFingerprintCommand added in v0.0.8

func (a *WebScan) InitFingerprintCommand()

InitFingerprintCommand initializes the fingerprint command for the webscan CLI. This command is used to perform a fingerprint against a URL target, capturing data TLS and HTTP methods that exist on the URL.

func (*WebScan) InitFuzzCommand

func (a *WebScan) InitFuzzCommand()

InitFuzzCommand initializes the fuzz command for the webscan CLI. This command is used to perform a web fuzz against a target.

func (*WebScan) InitPagecaptureCommand added in v0.0.21

func (a *WebScan) InitPagecaptureCommand()

InitPagecaptureCommand initializes the pagecapture command for the webscan CLI. This command is used to collect the HTML of a webpage from a URL target.

func (*WebScan) InitRootCommand

func (a *WebScan) InitRootCommand()

InitRootCommand initializes the root command for the webscan CLI. This command is the parent command for all other subcommands that can be invoked. It also sets up the version command, which prints the version of the CLI when invoked. The root command also sets up the output configuration and signal, which are used to write the output of the subcommands to the appropriate location (file or stdout). Here, we set the PersistentPreRunE and PersistentPostRunE functions that are propagated to all subcommands. These functions are used to set up the output configuration and signal before the command is run, and to write the output signal after the command has completed.

func (*WebScan) InitRoutecaptureCommand added in v0.0.21

func (a *WebScan) InitRoutecaptureCommand()

InitRoutecaptureCommand initializes the Routecapture command for the webscan CLI. This command is used to collect the HTML of a webpage from a URL target.

func (*WebScan) InitSpiderCommand

func (a *WebScan) InitSpiderCommand()

InitSpiderCommand initializes the spider command for the webscan CLI. This command is used to perform a web spider crawl against URL targets, capturing data about webpages and endpoints that exist on the target.

func (*WebScan) InitVulnCommand

func (a *WebScan) InitVulnCommand()

InitVulnCommand initializes the vuln command for the webscan CLI. This command is used to perform a vulnerability scan against a target by leveraging Project Discovery's nuclei tool.

func (*WebScan) InitWebServerCommand added in v0.0.23

func (a *WebScan) InitWebServerCommand()

InitWebServerCommand initializes the probe command for the webscan CLI. This command is used to perform a web probe against targets to identify the existence of web servers.

Jump to

Keyboard shortcuts

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