managesieve

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: Apache-2.0, ISC Imports: 11 Imported by: 0

Documentation

Overview

Package main provides a zgrab2 module that scans for ManageSieve servers. ManageSieve is a protocol for remotely managing Sieve scripts used for email filtering. Default port: 4190 (TCP)

RFC 5804: https://tools.ietf.org/html/rfc5804

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterModule

func RegisterModule()

RegisterModule registers the ManageSieve module with zgrab2

Types

type Flags

type Flags struct {
	zgrab2.BaseFlags `group:"Basic Options"`
	zgrab2.TLSFlags  `group:"TLS Options"`
	BannerTimeout    time.Duration `` /* 158-byte string literal not displayed */
}

Flags holds the command-line configuration for the ManageSieve scan module.

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 validates the flags.

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 {
	// Banner is the initial server greeting
	Banner string `json:"banner,omitempty"`

	// Capabilities contains the server capabilities
	Capabilities []string `json:"capabilities,omitempty"`

	// SieveVersion is the supported Sieve version
	SieveVersion string `json:"sieve_version,omitempty"`

	// Implementation identifies the server implementation
	Implementation string `json:"implementation,omitempty"`

	// StartTLSSupported indicates if the server supports STARTTLS
	StartTLSSupported bool `json:"starttls_supported"`

	// AuthMechanisms lists supported authentication mechanisms
	AuthMechanisms []string `json:"auth_mechanisms,omitempty"`

	// TLSLog contains the TLS handshake log if TLS was used
	TLSLog *zgrab2.TLSLog `json:"tls,omitempty"`

	// StartTLSResponse is the server response to the STARTTLS command
	StartTLSResponse string `json:"starttls_response,omitempty"`

	// Per RFC 5804, the server must advertise capabilities after TLS connection establishment
	PostTLSCapabilities []string `json:"post_tls_capabilities,omitempty"`
}

ScanResults holds the results of a ManageSieve scan.

type Scanner

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

Scanner implements the zgrab2.Scanner interface.

func (*Scanner) GetDialerGroupConfig

func (scanner *Scanner) GetDialerGroupConfig() *zgrab2.DialerGroupConfig

func (*Scanner) GetName

func (scanner *Scanner) GetName() string

GetName returns the scanner name.

func (*Scanner) GetScanMetadata

func (scanner *Scanner) GetScanMetadata() interface{}

GetScanMetadata returns any metadata about the scan (implementing zgrab2.Scanner)

func (*Scanner) GetTrigger

func (scanner *Scanner) GetTrigger() string

GetTrigger returns the scanner trigger.

func (*Scanner) Init

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

Init initializes the scanner with the given flags.

func (*Scanner) InitPerSender

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

InitPerSender initializes the scanner for each sender goroutine.

func (*Scanner) Protocol

func (scanner *Scanner) Protocol() string

Protocol returns the protocol identifier.

func (*Scanner) Scan

func (scanner *Scanner) Scan(ctx context.Context, dialerGroup *zgrab2.DialerGroup, target *zgrab2.ScanTarget) (zgrab2.ScanStatus, any, error)

Scan performs the ManageSieve scan.

Jump to

Keyboard shortcuts

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