package
0.0.0-20240523144707-f5b61b103af6
Repository: https://github.com/packetloop/zgrab2.git
Documentation: pkg.go.dev
# Functions
NewConnection creates a new MSSQL connection using the given raw socket connection to the database.
RegisterModule is called by modules/mssql.go's init().
# Constants
EncryptModeNotSupported means that the client/server does not support encryption.
EncryptModeOff means that encryption will only be used for login.
EncryptModeOn means that encryption will be used for the entire session.
EncryptModeRequired is sent by the server when the client sends EncryptModNotSupported but the server requires it.
EncryptModeUnknown is not a valid ENCRYPTION value.
PreloginEncryption is the ENCRYPTION token.
PreloginFedAuthRequired is the FEDAUTHREQUIRED token.
PreloginInstance is the INSTOPT token.
PreloginMARS is the MARS token.
PreloginNonce is the NONCEOPT token.
PreloginTerminator is the TERMINATOR token.
PreloginThreadID is the THREADID token.
PreloginTraceID is the TRACEID token.
PreloginVersion is the VERSION token.
TDSPacketTypeAttentionSignal identifies an attention signal.
TDSPacketTypeBulkLoadData identifies a bulk-load-data packet.
TDSPacketTypeFederatedAuthToken identifies a federated authentication token.
TDSPacketTypePrelogin identifies a PRELOGIN packet.
TDSPacketTypePreTDS7Login is the packet type for clients using "legacy" pre-TDS7 logins.
TDSPacketTypeRPC identifies an RPC packet.
TDSPacketTypeSQLBatch identifies a SQL batch.
TDSPacketTypeSSPI identifies an SSPI packet.
TDSPacketTypeTabularResult identifies a tabular result.
TDSPacketTypeTDS7Login identifies a TDS7 login.
TDSPacketTypeTransactionManagerRequest identifies a transaction manager request.
TDSStatusEOM is an End of message (EOM).
TDSStatusIgnore: Ignore this event (0x01 MUST also be set).
TDSStatusNormal is a "Normal" message.
TDSStatusResetConnection reset this connection before processing event.
Reset the connection before processing event but do not modify the transaction state.
# Variables
ErrBufferTooSmall is returned when a buffer is smaller than necessary.
ErrInvalidData is returned when we receive data from the server that cannot be interpreted as a valid packet.
ErrInvalidState is returned when attempting to take an action that is not allowed in the current state of the connection.
ErrNoServerEncryption is returned if the client requires encryption but the server does not support it.
ErrServerRequiresEncryption is returned if the server requires encryption but the client does not support it.
ErrTooLarge is returned when a size is larger than 64k.
# Structs
Connection wraps the state of a single MSSQL connection.
Flags defines the command-line configuration options for the module.
Module is the implementation of zgrab2.Module for the MSSQL protocol.
Scanner is the implementation of zgrab2.Scanner for the MSSQL protocol.
ScanResults contains detailed information about each step of the MySQL handshake, and can be encoded to JSON.
ServerVersion is a direct representation of the VERSION PRELOGIN token value.
TDSHeader is an 8-byte structure prepended to all TDS packets.
TDSPacket is a header followed by the body.
# Type aliases
EncryptMode is defined at https://msdn.microsoft.com/en-us/library/dd357559.aspx.
PreloginOption values are stored as byte arrays; actual types are specified in the docs.
PreloginOptions maps the token to the value for that option.
PreloginOptionToken represents a PL_OPTION_TOKEN value, defined at https://msdn.microsoft.com/en-us/library/dd357559.aspx.
TDSPacketType represents the Type entry in the TDSPacket.