cassandra

package
v0.0.0-...-952dcf1 Latest Latest
Warning

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

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

Documentation

Overview

Package cassandra provides a zgrab2 module that scans for cassandra. TODO: Describe module, the flags, the probe, the output, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterModule

func RegisterModule()

RegisterModule registers the zgrab2 module.

Types

type Flags

type Flags struct {
	zgrab2.BaseFlags
	zgrab2.TLSFlags

	Verbose bool `long:"verbose" description:"More verbose logging, include debug fields in the scan results"`
}

Flags holds the command-line configuration for the cassandra scan module. Populated by the framework.

func (*Flags) Help

func (flags *Flags) Help() string

Help returns the module's help string.

func (*Flags) Validate

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

Validate checks that the flags are valid. On success, returns nil. On failure, returns an error instance describing the error.

type HostInformation

type HostInformation struct {
	Hostname         string `json:"hostname,omitempty"`
	Peer             string `json:"peer,omitempty"`
	BroadcastAddress string `json:"broadcast_address,omitempty"`
	ListenAddress    string `json:"listen_address,omitempty"`
	RpcAddress       string `json:"rpc_address,omitempty"`
	PreferredIP      string `json:"preferred_ip,omitempty"`
	ConnectAddress   string `json:"connect_address,omitempty"`
	Port             int    `json:"port,omitempty"`
	DataCenter       string `json:"data_center,omitempty"`
	Rack             string `json:"rack,omitempty"`
	HostId           string `json:"host_id,omitempty"`
	Workload         string `json:"workload,omitempty"`
	DseVersion       string `json:"dse_version,omitempty"`
	Partitioner      string `json:"partitioner,omitempty"`
	ClusterName      string `json:"cluster_name,omitempty"`
	Version          string `json:"cass_version,omitempty"`
	State            string `json:"node_state,omitempty"`
	SchemaVersion    string `json:"schema_version,omitempty"`
	Tokens           int    `json:"tokens,omitempty"`
}

func HostResults

func HostResults(hostinfo *gocql.HostInfo) *HostInformation

type Module

type Module struct {
}

Module implements the zgrab2.Module interface.

func (*Module) Description

func (module *Module) Description() string

Description returns an overview of this module.

func (*Module) NewFlags

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

NewFlags returns a default Flags object.

func (*Module) NewScanner

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

NewScanner returns a new Scanner instance.

type ScanResults

type ScanResults struct {
	ClusterNodes []*HostInformation `json:"cluster_nodes,omitempty"`

	Partitioner string `json:"partitioner,omitempty"`

	// Protocols that support TLS should include
	// TLSLog      *zgrab2.TLSLog `json:"tls,omitempty"`
	// TLSLog is the shared TLS handshake/scan log.
	TLSLog *zgrab2.TLSLog `json:"tls,omitempty"`
}

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

type Scanner

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

Scanner implements 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.

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)

Scan TODO: describe what is scanned

Jump to

Keyboard shortcuts

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