mysql

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: Apache-2.0 Imports: 5 Imported by: 8

Documentation

Index

Constants

View Source
const (
	// protocolVersion = 10
	// maxPacketLength = 1<<24 - 1
	MYSQL = "MySQL"
)

Variables

This section is empty.

Functions

func CheckErrorMessagePacket

func CheckErrorMessagePacket(response []byte) (string, int, error)

CheckErrorMessagePacket checks the response packet error message

func CheckInitialHandshakePacket

func CheckInitialHandshakePacket(response []byte) (string, error)

CheckInitialHandshakePacket checks if the response received from the server matches the expected response for the MySQL service

Types

type MYSQLPlugin

type MYSQLPlugin struct{}

func (*MYSQLPlugin) Name

func (p *MYSQLPlugin) Name() string

func (*MYSQLPlugin) PortPriority

func (p *MYSQLPlugin) PortPriority(port uint16) bool

func (*MYSQLPlugin) Priority

func (p *MYSQLPlugin) Priority() int

func (*MYSQLPlugin) Run

func (p *MYSQLPlugin) Run(conn net.Conn, timeout time.Duration, target plugins.Target) (*plugins.Service, error)

Run checks if the identified service is a MySQL (or MariaDB) server using two methods. Upon the connection of a client to a MySQL server it can return one of two responses. Either the server returns an initial handshake packet or an error message packet.

func (*MYSQLPlugin) Type

func (p *MYSQLPlugin) Type() plugins.Protocol

Jump to

Keyboard shortcuts

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