socks5

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: 8 Imported by: 0

Documentation

Overview

Package socks5 contains the zgrab2 Module implementation for SOCKS5.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterModule

func RegisterModule()

RegisterModule registers the socks5 zgrab2 module.

Types

type Connection

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

Connection holds the state for a single connection to the SOCKS5 server.

func (*Connection) PerformConnectionRequest

func (conn *Connection) PerformConnectionRequest() error

PerformConnectionRequest sends a connection request to the SOCKS5 server.

func (*Connection) PerformHandshake

func (conn *Connection) PerformHandshake() (bool, error)

PerformHandshake performs the SOCKS5 handshake.

type Flags

type Flags struct {
	zgrab2.BaseFlags
}

Flags are the SOCKS5-specific command-line flags.

func (*Flags) Help

func (f *Flags) Help() string

Help returns this module's help string.

func (*Flags) Validate

func (f *Flags) Validate(_ []string) (err error)

Validate flags

type Module

type Module struct {
}

Module implements the zgrab2.Module interface.

func (*Module) Description

func (m *Module) Description() string

Description returns an overview of this module.

func (*Module) NewFlags

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

NewFlags returns the default flags object to be filled in with the command-line arguments.

func (*Module) NewScanner

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

NewScanner returns a new Scanner instance.

type ScanResults

type ScanResults struct {
	Version                       string            `json:"version,omitempty"`
	MethodSelection               string            `json:"method_selection,omitempty"`
	ConnectionResponse            string            `json:"connection_response,omitempty"`
	ConnectionResponseExplanation map[string]string `json:"connection_response_explanation,omitempty"`
}

ScanResults is the output of the scan.

type Scanner

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

Scanner implements the zgrab2.Scanner interface, and holds the state for a single scan.

func (*Scanner) GetDialerGroupConfig

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

func (*Scanner) GetName

func (scanner *Scanner) GetName() string

GetName returns the configured name for the Scanner.

func (*Scanner) GetScanMetadata added in v1.0.0

func (scanner *Scanner) GetScanMetadata() any

GetScanMetadata returns any metadata on the scan itself from this module.

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 instance with the flags from the command line.

func (*Scanner) InitPerSender

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

InitPerSender does nothing in this module.

func (*Scanner) Protocol

func (scanner *Scanner) Protocol() string

Protocol returns the protocol identifier for the scanner.

func (*Scanner) Scan

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

Scan performs the configured scan on the SOCKS5 server.

Jump to

Keyboard shortcuts

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