Versions in this module Expand all Collapse all v0 v0.1.9 Nov 10, 2022 Changes in this version + const CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS + const CLIENT_COMPRESS + const CLIENT_CONNECT_ATTRS + const CLIENT_CONNECT_WITH_DB + const CLIENT_DEPRECATED_EOF + const CLIENT_FOUND_ROWS + const CLIENT_IGNORE_SIGPIPE + const CLIENT_IGNORE_SPACE + const CLIENT_INTERACTIVE + const CLIENT_LOCAL_FILES + const CLIENT_LONG_FLAG + const CLIENT_LONG_PASSWORD + const CLIENT_MULTI_RESULTS + const CLIENT_MULTI_STATEMENTS + const CLIENT_NO_SCHEMA + const CLIENT_ODBC + const CLIENT_PLUGIN_AUTH + const CLIENT_PLUGIN_AUTH_LEN_ENC_CLIENT_DATA + const CLIENT_PROTOCOL_41 + const CLIENT_PS_MULTI_RESULTS + const CLIENT_RESERVED + const CLIENT_SECURE_CONNECTION + const CLIENT_SESSION_TRACK + const CLIENT_SSL + const CLIENT_TRANSACTIONS + const DEFAULT_CLIENT_CAPABILITIES + const DEFAULT_PORT + const DEFAULT_RESERVED_DATA_HEX + const DEFAULT_TIMEOUT_SECS + const STATE_CONNECTED + const STATE_FINISHED + const STATE_NOT_CONNECTED + const STATE_SSL_HANDSHAKE + const STATE_SSL_REQUEST + var ErrorCodes = map[uint16]string + func GetClientCapabilityFlags(flags uint32) map[string]bool + func GetServerStatusFlags(flags uint16) map[string]bool + type Config struct + CharSet byte + ClientCapabilities uint32 + MaxPacketSize uint32 + ReservedData []byte + func InitConfig(base *Config) *Config + type Connection struct + Config *Config + Connection net.Conn + ConnectionLog ConnectionLog + SequenceNumber uint8 + State ConnectionState + func NewConnection(config *Config) *Connection + func (c *Connection) Connect(conn net.Conn) error + func (c *Connection) Disconnect() error + func (c *Connection) GetHandshake() *HandshakePacket + func (c *Connection) NegotiateTLS() error + func (c *Connection) SupportsTLS() bool + type ConnectionLog struct + Error *ConnectionLogEntry + Handshake *ConnectionLogEntry + SSLRequest *ConnectionLogEntry + type ConnectionLogEntry struct + Length uint32 + Parsed PacketInfo + Raw string + SequenceNumber uint8 + type ConnectionState string + type ERRPacket struct + ErrorCode uint16 + ErrorMessage string + Header byte + SQLState string + SQLStateMarker string + func (e *ERRPacket) Error() string + func (e *ERRPacket) GetErrorID() string + func (e *ERRPacket) GetScanError() *zgrab2.ScanError + type HandshakePacket struct + AuthPluginData1 []byte + AuthPluginData2 []byte + AuthPluginDataLen byte + AuthPluginName string + CapabilityFlags uint32 + CharacterSet byte + ConnectionID uint32 + Filler1 byte + ProtocolVersion byte + Reserved []byte + ServerVersion string + ShortHandshake bool + StatusFlags uint16 + func (p *HandshakePacket) MarshalJSON() ([]byte, error) + type OKPacket struct + AffectedRows uint64 + Header byte + Info string + LastInsertId uint64 + SessionStateChanges string + StatusFlags uint16 + Warnings uint16 + func (p *OKPacket) MarshalJSON() ([]byte, error) + type PacketInfo interface + type SSLRequestPacket struct + CapabilityFlags uint32 + CharacterSet byte + MaxPacketSize uint32 + Reserved []byte + func (p *SSLRequestPacket) EncodeBody() []byte + func (p *SSLRequestPacket) MarshalJSON() ([]byte, error) + type WritablePacket interface + EncodeBody func() []byte