Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Decoder = &decoder.AbstractDecoder{ Type: types.Type_NC_Service, Name: "Service", Description: "A network service", PostInit: func(d *decoder.AbstractDecoder) error { var err error serviceLog, _, err = logging.InitZapLogger( decoderconfig.Instance.Out, "service", decoderconfig.Instance.Debug, ) if err != nil { return err } serviceLogSugared = serviceLog.Sugar() return initServiceProbes() }, DeInit: func(e *decoder.AbstractDecoder) error { // flush writer var err error for _, item := range Store.Items { item.Lock() err = e.Writer.Write(item.Service) if err != nil { serviceLog.Error("failed to flush service audit record", zap.Error(err)) } item.Unlock() atomic.AddInt64(&e.NumRecordsWritten, 1) } return serviceLog.Sync() }, }
Decoder for protocol analysis and writing audit records to disk.
View Source
var Store = &atomicServiceMap{ Items: make(map[string]*service), }
Store ServiceStore holds all tcp service banners.
Functions ¶
func MatchServiceProbes ¶
MatchServiceProbes will check the service banner against the probes.
func NewService ¶
NewService creates a new network service.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.