Versions in this module Expand all Collapse all v0 v0.1.7 May 10, 2023 v0.0.0 May 10, 2023 Changes in this version + const CFInterchangeInvolved + const CFServicesEnabled + const CFServicesLinkedIn + const CFServicesRequired + const CFServicesWanted + const CFUnknown20 + const CFUnknown40 + const CFUnknown80 + const DFConfirmImmediately + const DFConfirmation + const DFEOF + const DFMoreData + const DFRequestConfirmation + const DFRequestToSend + const DFReserved + const DFSendNTTrailer + const DFSendToken + const DFUnknown0010 + const DFUnknown0400 + const DFUnknown0800 + const DFUnknown1000 + const DFUnknown2000 + const DFUnknown4000 + const DFUnknown8000 + const DataIDNSN + const NSNServiceAuthentication + const NSNServiceDataIntegrity + const NSNServiceEncryption + const NSNServiceSupervisor + const NSNValueTypeBytes + const NSNValueTypeStatus + const NSNValueTypeString + const NSNValueTypeUB1 + const NSNValueTypeUB2 + const NSNValueTypeUB4 + const NSNValueTypeVersion + const NTPCAsyncIO + const NTPCCallbackIO + const NTPCCanGrant + const NTPCCanHandoff + const NTPCConfirmedRelease + const NTPCDataTest + const NTPCFullDuplex + const NTPCGenerateSIGIO + const NTPCGenerateSIGPIPE + const NTPCGenerateSIGURG + const NTPCHangon + const NTPCPacketIO + const NTPCSpawnerRunning + const NTPCTDUBasedIO + const NTPCTestOperation + const NTPCUrgentIO + const PacketTypeAbort + const PacketTypeAccept + const PacketTypeAcknowledge + const PacketTypeAttention + const PacketTypeConnect + const PacketTypeControl + const PacketTypeData + const PacketTypeMarker + const PacketTypeNull + const PacketTypeRedirect + const PacketTypeRefuse + const PacketTypeResend + const SOAttentionProcessing + const SOBrokenConnectNotify + const SOCanReceiveAttention + const SOCanSendAttention + const SODirectIO + const SOFullDuplex + const SOHalfDuplex + const SOHeaderChecksum + const SOPacketChecksum + const SOUnknown0001 + const SOUnknown0020 + const SOUnknown0040 + const SOUnknown0080 + const SOUnknown0100 + const SOUnknown4000 + const SOUnknown8000 + var ErrBufferTooSmall = errors.New("buffer too small") + var ErrInvalidData = errors.New("server returned invalid data") + var ErrInvalidInput = errors.New("caller provided invalid input") + var ErrUnexpectedResponse = errors.New("server returned unexpected response") + func RegisterModule() + type ConnectFlags uint8 + func (flags ConnectFlags) Set() map[string]bool + type Connection struct + func (conn *Connection) Connect(connectDescriptor string) (*HandshakeLog, error) + func (conn *Connection) SendPacket(packet TNSPacketBody) (TNSPacketBody, error) + type DataFlags uint16 + func (flags DataFlags) Set() map[string]bool + type Descriptor []DescriptorEntry + func DecodeDescriptor(descriptor string) (Descriptor, error) + func (descriptor *Descriptor) GetValue(key string) (string, error) + func (descriptor Descriptor) GetValues(key string) []string + type DescriptorEntry struct + Key string + Value string + type Flags struct + ConnectDescriptor string + ConnectFlags string + GlobalServiceOptions string + MinVersion uint16 + NewTNS bool + ProtocolCharacterisics string + ReleaseVersion string + SDU string + TCPS bool + TDU string + Verbose bool + Version uint16 + func (flags *Flags) Help() string + func (flags *Flags) Validate(args []string) error + type HandshakeLog struct + AcceptVersion uint16 + ConnectFlags0 map[string]bool + ConnectFlags1 map[string]bool + DidResend bool + GlobalServiceOptions map[string]bool + NSNServiceVersions map[string]string + NSNVersion string + RedirectTarget Descriptor + RedirectTargetRaw string + RefuseError Descriptor + RefuseErrorRaw string + RefuseReasonApp string + RefuseReasonSys string + RefuseVersion string + type Module struct + func (module *Module) Description() string + func (module *Module) NewFlags() interface{} + func (module *Module) NewScanner() zgrab2.Scanner + type NSNOptions uint8 + type NSNService struct + Marker uint32 + Type NSNServiceType + Values []NSNValue + func ReadNSNService(reader io.Reader, ret *NSNService) (*NSNService, error) + func (service *NSNService) Encode() ([]byte, error) + func (service *NSNService) GetSize() (uint16, error) + type NSNServiceType uint16 + func (typ NSNServiceType) IsUnknown() bool + func (typ NSNServiceType) String() string + type NSNValue struct + Type NSNValueType + Value []byte + func NSNValueBytes(bytes []byte) *NSNValue + func NSNValueStatus(val uint16) *NSNValue + func NSNValueString(val string) *NSNValue + func NSNValueUB1(val uint8) *NSNValue + func NSNValueUB2(val uint16) *NSNValue + func NSNValueVersion(v string) *NSNValue + func ReadNSNValue(reader io.Reader, ret *NSNValue) (*NSNValue, error) + func (value *NSNValue) Encode() ([]byte, error) + func (value *NSNValue) MarshalJSON() ([]byte, error) + func (value *NSNValue) String() string + type NSNValueType uint16 + type NTProtocolCharacteristics uint16 + func (flags NTProtocolCharacteristics) Set() map[string]bool + type PacketType uint8 + func (packetType PacketType) String() string + type RefuseReason uint8 + func (reason RefuseReason) String() string + type ReleaseVersion uint32 + func EncodeReleaseVersion(value string) (ReleaseVersion, error) + func (v ReleaseVersion) Bytes() []byte + func (v ReleaseVersion) String() string + type ScanResults struct + Handshake *HandshakeLog + TLSLog *zgrab2.TLSLog + type Scanner struct + func (scanner *Scanner) GetName() string + func (scanner *Scanner) GetTrigger() string + func (scanner *Scanner) Init(flags zgrab2.ScanFlags) error + func (scanner *Scanner) InitPerSender(senderID int) error + func (scanner *Scanner) Protocol() string + func (scanner *Scanner) Scan(t zgrab2.ScanTarget) (zgrab2.ScanStatus, interface{}, error) + type ServiceOptions uint16 + func (flags ServiceOptions) Set() map[string]bool + type TNSAccept struct + AcceptData []byte + ByteOrder [2]byte + ConnectFlags0 ConnectFlags + ConnectFlags1 ConnectFlags + DataLength uint16 + DataOffset uint16 + GlobalServiceOptions ServiceOptions + SDU uint16 + TDU uint16 + Unknown18 []byte + Version uint16 + func ReadTNSAccept(reader io.Reader, header *TNSHeader) (*TNSAccept, error) + func (packet *TNSAccept) Encode() ([]byte, error) + func (packet *TNSAccept) GetType() PacketType + type TNSConnect struct + ByteOrder [2]byte + ConnectDescriptor string + ConnectFlags0 ConnectFlags + ConnectFlags1 ConnectFlags + ConnectionID0 [8]byte + ConnectionID1 [8]byte + CrossFacility0 uint32 + CrossFacility1 uint32 + DataLength uint16 + DataOffset uint16 + GlobalServiceOptions ServiceOptions + MaxBeforeAck uint16 + MaxResponseSize uint32 + MinVersion uint16 + ProtocolCharacteristics NTProtocolCharacteristics + SDU uint16 + TDU uint16 + Unknown3A []byte + Version uint16 + func ReadTNSConnect(reader io.Reader, header *TNSHeader) (*TNSConnect, error) + func (packet *TNSConnect) Encode() ([]byte, error) + func (packet *TNSConnect) GetType() PacketType + type TNSData struct + Data []byte + DataFlags DataFlags + func ReadTNSData(reader io.Reader, header *TNSHeader) (*TNSData, error) + func (packet *TNSData) Encode() ([]byte, error) + func (packet *TNSData) GetID() uint32 + func (packet *TNSData) GetType() PacketType + type TNSDataNSN struct + ID uint32 + Options NSNOptions + Services []NSNService + Version ReleaseVersion + func DecodeTNSDataNSN(data []byte) (*TNSDataNSN, error) + func ReadTNSDataNSN(reader io.Reader) (*TNSDataNSN, error) + func (packet *TNSDataNSN) Encode() ([]byte, error) + func (packet *TNSDataNSN) GetSize() (uint16, error) + type TNSDriver struct + Mode TNSMode + func (driver *TNSDriver) EncodePacket(packet *TNSPacket) ([]byte, error) + func (driver *TNSDriver) ReadTNSHeader(reader io.Reader) (*TNSHeader, error) + func (driver *TNSDriver) ReadTNSPacket(reader io.Reader) (*TNSPacket, error) + type TNSFlags uint8 + type TNSHeader struct + Flags TNSFlags + HeaderChecksum uint16 + Length uint32 + PacketChecksum uint16 + Type PacketType + func (header *TNSHeader) Encode() ([]byte, error) + type TNSMode int + const TNSMode12c + const TNSModeOld + type TNSPacket struct + Body TNSPacketBody + Header *TNSHeader + type TNSPacketBody interface + Encode func() ([]byte, error) + GetType func() PacketType + type TNSRedirect struct + Data []byte + DataLength uint16 + func ReadTNSRedirect(reader io.Reader, header *TNSHeader) (*TNSRedirect, error) + func (packet *TNSRedirect) Encode() ([]byte, error) + func (packet *TNSRedirect) GetType() PacketType + type TNSRefuse struct + AppReason RefuseReason + Data []byte + DataLength uint16 + SysReason RefuseReason + func ReadTNSRefuse(reader io.Reader, header *TNSHeader) (*TNSRefuse, error) + func (packet *TNSRefuse) Encode() ([]byte, error) + func (packet *TNSRefuse) GetType() PacketType + type TNSResend struct + func ReadTNSResend(reader io.Reader, header *TNSHeader) (*TNSResend, error) + func (packet *TNSResend) Encode() ([]byte, error) + func (packet *TNSResend) GetType() PacketType