mysql

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0, Apache-2.0 Imports: 5 Imported by: 0

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