banner

package
v0.1.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoMatchError = errors.New("pattern did not match")

Functions

func RegisterModule

func RegisterModule()

RegisterModule is called by modules/banner.go to register the scanner.

Types

type Flags

type Flags struct {
	zgrab2.BaseFlags
	Probe     string `` /* 173-byte string literal not displayed */
	ProbeFile string `long:"probe-file" description:"Read probe from file as byte array (hex). Mutually exclusive with --probe"`
	Pattern   string `long:"pattern" description:"Pattern to match, must be valid regexp."`
	UseTLS    bool   `long:"tls" description:"Sends probe with TLS connection. Loads TLS module command options. "`
	MaxTries  int    `` /* 154-byte string literal not displayed */
	Hex       bool   `long:"hex" description:"Store banner value in hex. "`
	zgrab2.TLSFlags
}

Flags give the command-line flags for the banner module.

func (*Flags) Help

func (f *Flags) Help() string

Help returns the module's help string.

func (*Flags) Validate

func (f *Flags) Validate(args []string) error

Validate validates the flags and returns nil on success.

type Module

type Module struct {
}

Module is the implementation of the zgrab2.Module interface.

func (*Module) Description

func (module *Module) Description() string

Description returns an overview of this module.

func (*Module) NewFlags

func (m *Module) NewFlags() interface{}

NewFlags returns a new default flags object.

func (*Module) NewScanner

func (m *Module) NewScanner() zgrab2.Scanner

NewScanner returns a new Scanner object.

type Results

type Results struct {
	Banner string `json:"banner,omitempty"`
	Length int    `json:"length,omitempty"`
}

ScanResults instances are returned by the module's Scan function.

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

Scanner is the implementation of the zgrab2.Scanner interface.

func (*Scanner) GetName

func (scanner *Scanner) GetName() string

GetName returns the Scanner name defined in the Flags.

func (*Scanner) GetTrigger

func (scanner *Scanner) GetTrigger() string

GetTrigger returns the Trigger defined in the Flags.

func (*Scanner) Init

func (scanner *Scanner) Init(flags zgrab2.ScanFlags) error

Init initializes the Scanner with the command-line flags.

func (*Scanner) InitPerSender

func (scanner *Scanner) InitPerSender(senderID int) error

InitPerSender initializes the scanner for a given sender.

func (*Scanner) Protocol

func (scanner *Scanner) Protocol() string

Protocol returns the protocol identifier of the scan.

func (*Scanner) Scan

func (scanner *Scanner) Scan(target zgrab2.ScanTarget) (zgrab2.ScanStatus, interface{}, error)

Jump to

Keyboard shortcuts

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